2

I would like to restrict certain warnings to project includes, so system includes are not checked. So:

/* I want no warnings from this include */ #include <myheader.h> /* I want warnings from this include */ #include "myotherheader.h" 

Is this possible with llvm and/or gcc?

Regards, Jochen

1 Answer 1

1

GCC already does this - you can specify additional directories to be considered as 'system directories' if you have some headers that you want to suppress warnings for:

I don't really know about llvm/clang, but since clang has an option, -Wsystem-headers, to enable warnings from system headers I'd assume it does something similar to GCC for system headers (i.e., suppress warnings for them).

Sign up to request clarification or add additional context in comments.

1 Comment

Can GCC distinguish the two types based on the 'quote type' ("" vs. <>) without using -isystem? At least on the compilers shipped with Xcode 4.0.2, both included files generate warnings.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.