CPLUS_INCLUDE_PATH confused by colons
Neil Booth
neil@daikokuya.demon.co.uk
Mon Mar 25 13:35:00 GMT 2002
Zack Weinberg wrote:-
> Since we have decided to keep this behavior, it should be documented.
> What do you think of this patch? (It also corrects the description of
> CPATH, which is equivalent to -isystem, not -I.)
>
> zw
>
> ===================================================================
> Index: doc/cppenv.texi
> --- doc/cppenv.texi 2002/03/11 21:11:35 1.2
> +++ doc/cppenv.texi 2002/03/25 20:57:43
> @@ -24,14 +24,20 @@ determined at GCC build time. For Windo
> semicolon, and for almost all other targets it is a colon.
>
> @env{CPATH} specifies a list of directories to be searched as if
> -specified with @option{-I}, but after any paths given with @option{-I}
> -options on the command line. The environment variable is used
> -regardless of which language is being preprocessed.
> +specified with @option{-isystem}, hence after any paths given with
> +@option{-I} options on the command line. This environment variable is
> +used regardless of which language is being preprocessed.
Why have you changed this? I don't think it's the same as -isystem,
since they're not flagged as system directories:
GET_ENV_PATH_LIST (path, "CPATH");
if (path != 0 && *path != 0)
path_include (pfile, path, BRACKET);
versus
if (path != 0 && *path != 0)
path_include (pfile, path, SYSTEM);
path_include only treats the latter as a system include path.
[If I have this wrong, then the comment in cppinit.c will need to be
changed.]
> +In all these variables, an empty element instructs the compiler to
> +search its current working directory. Empty elements can appear at the
> +beginning or end of a path. For instance, if the value of
> +@env{C_INCLUDE_PATH} is @code{:/special/include}, that has the same
> +effect as @samp{@w{-I. -I/special/include}}.
-isystem. -isystem/special/include no?
Neil.
More information about the Gcc-bugs
mailing list