By placing them in a project file, you maintain a close relationship between specific platform warnings and the platform, which seems right to me.
If they are in code, they are always in code, regardless of whether it is suitable for the platform. You do not need this for GCC or, possibly, future versions of Visual C ++. On the other hand, having it in code, it is more obvious that it is there at all. If you move (copy) the code, it will be easier to remember the movement defining with it.
Pros and cons every way. YMMV.
source share