This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Quotes and Brackets In Include Directives



> I always thought that:
> 
> #include <string.h>
> 
> would include the string.h header in the "system" include path while:
> 
> #include "string.h"
> 
> would include a different string.h header file in the "local" include
> path.

You thought wrong.  The relevant standards have always mandated that
the "" search list be a superset of the <> include search list.

Order is, IIRC, implementation defined.

In particular, this means that having local include files with names
that are the same as system headers is asking for trouble.  Various
compilers can and do differ in which one you will get with various
combinations of CWD, -I options, etc.

-Tim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]