Re:Compiler Warnings
by raptorfactor on Thursday January 24, 2019 @06:52PM
(#18994238)
The same functionality is available: https://docs.microsoft.com/en-us/cpp/preprocessor/warning?vi...
Re:Compiler Warnings
by MaulingMonkey on Thursday January 24, 2019 @10:44PM
(#18995392)
And you can use _Pragma / __pragma to hide them inside (conditional) macros without #ifdefing up every call site.
There are still edge cases where you can't sanely scope them relating to when templates are evaluated, being unable to use the pragmas at arbitrary points of an expression, warnings that don't respect the warning flags properly, etc. - but it works most of the time.
That said, for warnings with high false positives and low value true positives, I'll just globally suppress the warning.
Don't know what the situation is on MS's and Intel's compilers.