-
Notifications
You must be signed in to change notification settings - Fork 493
Open
Labels
Description
gcc, clang, etc. use -isystem to add an include path and to mark that no warnings should be generated for code within them. This also includes when macros are defined in system headers:
$ clang++ test.cpp -I include/ -Wold-style-cast test.cpp:3:21: warning: use of old-style cast [-Wold-style-cast] int main() { return FOO(0); } ^~~~~~ include/test.h:1:17: note: expanded from macro 'FOO' #define FOO(x) ((int)(x)) ^ ~~~ $ clang++ test.cpp -isystem include/ -Wold-style-cast $
In a large project I'm checking, use of Boost constructs such as the BOOST_FOREACH and BOOST_ASSERT macros generate a lot of bogus warnings.
samvasko, briggySmalls, N-Wouda and blockspacer