]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/18322 (__func__ diagnostic in bad location)
authorJoseph Myers <joseph@codesourcery.com>
Wed, 10 Nov 2004 19:46:33 +0000 (19:46 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Wed, 10 Nov 2004 19:46:33 +0000 (19:46 +0000)
PR c/18322
* c-common.c (fname_decl): Don't use line number of decl in
diagnostic.

testsuite:
* gcc.dg/func-outside-1.c, gcc.dg/func-outside-2.c: New tests.

From-SVN: r90448

gcc/ChangeLog
gcc/c-common.c
gcc/testsuite/ChangeLog

index da54e957b3f7a5c06eee660d8b2a848082a8e979..e3f1af6833e004ffff4dd4efe9d652c1e72f3eab 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-10  Joseph S. Myers  <joseph@codesourcery.com>
+
+       PR c/18322
+       * c-common.c (fname_decl): Don't use line number of decl in
+       diagnostic.
+
 2004-11-10  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * config/sparc/sparc.c (function_arg_union_value): New 'slotno'
index ff78e4105bcd9a93c34f35b21d274b2476aff7a3..dd3cec9bef25e4af056bcef515f9f91445d4ec9a 100644 (file)
@@ -1137,7 +1137,7 @@ fname_decl (unsigned int rid, tree id)
       input_line = saved_lineno;
     }
   if (!ix && !current_function_decl)
-    pedwarn ("%J'%D' is not defined outside of function scope", decl, decl);
+    pedwarn ("'%D' is not defined outside of function scope", decl);
 
   return decl;
 }
index 3987d89ab448ece5823e004b206738ebd8c73458..a13f6c9327fe6ca771016451f2753d927e071450 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-10  Joseph S. Myers  <joseph@codesourcery.com>
+
+       PR c/18322
+       * gcc.dg/func-outside-1.c, gcc.dg/func-outside-2.c: Correct
+       expected diagnostic location.
+
 2004-11-10  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * gcc.dg/union-2.c: New test.