From dbead49c0a4e21b710926a9ee52328337531948d Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 4 Jul 2001 20:06:27 +0000 Subject: 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 --- gcc/cppinit.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gcc/cppinit.c') 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; } -- cgit v1.1