summaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-04 20:06:27 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-04 20:06:27 +0000
commit83e21af4cfcaad66538ab6319e40ad3350c982e1 (patch)
treef561f96897d67ba37dab1fe3762f2eeb5c37a52f /gcc/cppinit.c
parente87f0ab106b8d164e8a8a8e2a82b1d49f8acfb66 (diff)
downloadgcc-83e21af4cfcaad66538ab6319e40ad3350c982e1.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43769 138bc75d-0d04-0410-961f-82ee72b054a4
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 3c446b27989..5ac676a5c0b 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;
}