aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMichael Meissner <meissner@gcc.gnu.org>1993-08-12 21:14:02 +0000
committerMichael Meissner <meissner@gcc.gnu.org>1993-08-12 21:14:02 +0000
commit6e026f481e0d99c6aadef102be92604c15d49fa5 (patch)
treef65e5d21d1003f07b7768e19b3a2cc764872358e /gcc
parent7e2feebfc7712275906bc6497bc78f25e4963a77 (diff)
downloadgcc-6e026f481e0d99c6aadef102be92604c15d49fa5.zip
gcc-6e026f481e0d99c6aadef102be92604c15d49fa5.tar.gz
gcc-6e026f481e0d99c6aadef102be92604c15d49fa5.tar.bz2
Do not report -Wnested-extern errors for __FUNCTION__/__PRETTY_FUNCTION__.
From-SVN: r5146
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-decl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 55983f2..62f77e9 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1778,7 +1778,9 @@ pushdecl (x)
DECL_CONTEXT (x) = 0;
if (warn_nested_externs && DECL_EXTERNAL (x) && b != global_binding_level
- && x != IDENTIFIER_IMPLICIT_DECL (name))
+ && x != IDENTIFIER_IMPLICIT_DECL (name)
+ /* Don't print error messages for __FUNCTION__ and __PRETTY_FUNCTION__ */
+ && !DECL_IN_SYSTEM_HEADER (x))
warning ("nested extern declaration of `%s'", IDENTIFIER_POINTER (name));
if (name)