aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2001-07-04 20:06:27 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2001-07-04 20:06:27 +0000
commitdbead49c0a4e21b710926a9ee52328337531948d (patch)
treef561f96897d67ba37dab1fe3762f2eeb5c37a52f /gcc/cppinit.c
parent0cf97c8b4b732df1f15f697730f9ee50737e7b6a (diff)
downloadgcc-dbead49c0a4e21b710926a9ee52328337531948d.zip
gcc-dbead49c0a4e21b710926a9ee52328337531948d.tar.gz
gcc-dbead49c0a4e21b710926a9ee52328337531948d.tar.bz2
cppinit.c (remove_dup_dirs): Inform if a system include directory is being reordered.
* cppinit.c (remove_dup_dirs): Inform if a system include directory is being reordered. * doc/invoke.texi (Directory Options): GCC warns if you hide a system include. * doc/cpp.texi (Search Paths): Likewise. * doc/gcc.texi (Interoperation): Remove information about -I/usr/include. From-SVN: r43769
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index 3c446b2..5ac676a 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -297,6 +297,21 @@ remove_dup_dirs (pfile, head)
for (other = head; other != cur; other = other->next)
if (INO_T_EQ (cur->ino, other->ino) && cur->dev == other->dev)
{
+ if (cur->sysp)
+ {
+ cpp_warning (pfile,
+ "changing search order for system directory \"%s\"",
+ cur->name);
+ if (strcmp (cur->name, other->name))
+ cpp_warning (pfile, other->sysp
+ ? " as it is the same as system directory \"%s\""
+ : " as it is the same as non-system directory \"%s\"",
+ other->name);
+ else
+ cpp_warning (pfile, other->sysp
+ ? " as it has already been specified as a system directory"
+ : " as it has already been specified as a non-system directory");
+ }
cur = remove_dup_dir (pfile, prev);
break;
}