]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Do not report -Wnested-extern errors for __FUNCTION__/__PRETTY_FUNCTION__.
authorMichael Meissner <meissner@gcc.gnu.org>
Thu, 12 Aug 1993 21:14:02 +0000 (21:14 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Thu, 12 Aug 1993 21:14:02 +0000 (21:14 +0000)
From-SVN: r5146

gcc/c-decl.c

index 55983f2f7cf93e5c12a07b37f8a419a4bf4c98b1..62f77e997f56867cc0a89870db33d35c18d3c120 100644 (file)
@@ -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)