This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Quotes and Brackets In Include Directives
- To: Eric Lemings <eric dot b dot lemings at lmco dot com>
- Subject: Re: Quotes and Brackets In Include Directives
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Tue, 4 Sep 2001 20:53:43 +0100
- Cc: gcc at gcc dot gnu dot org
- References: <3B952FB8.2AD2B6C8@lmco.com>
Eric Lemings wrote:-
> 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.
>
> This doesn't seem to be the case in gcc-3.0.1 at least. The first form
> is including the local version rather than the system version of the
> string.h header. This never happened before 3.0.1. Is this new
> behavior? How do I distinguish the two header files?
The behaviour is described in the CPP manual. If you don't think CPP
is conforming to that description, then please report a bug.
Roughly: "" and <> indicate which of two points to start the search in
a long chain of include paths. By default, those two points are the
same. In addition, "" looks first in the directory of the current
file.
I don't know what you mean by "local" include path.
Neil.