diff options
author | Joseph Myers <joseph@codesourcery.com> | 2004-11-09 21:22:27 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2004-11-09 21:22:27 +0000 |
commit | 8b17a9d698ae32a281cb05521b5d3e3ef0ec6c0b (patch) | |
tree | bef9776a44038f6f2aa0dbaaf816e8fb1684d3b5 /gcc/c-common.c | |
parent | e221ef54b8cb4feb7e3b3def11afae562be2c559 (diff) | |
download | gcc-8b17a9d698ae32a281cb05521b5d3e3ef0ec6c0b.zip gcc-8b17a9d698ae32a281cb05521b5d3e3ef0ec6c0b.tar.gz gcc-8b17a9d698ae32a281cb05521b5d3e3ef0ec6c0b.tar.bz2 |
re PR c/18322 (__func__ diagnostic in bad location)
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: Correct
expected diagnostic location.
From-SVN: r90365
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 3a13dc7..413508e 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -828,7 +828,7 @@ fname_decl (unsigned int rid, tree id) input_location = saved_location; } if (!ix && !current_function_decl) - pedwarn ("%J%qD is not defined outside of function scope", decl, decl); + pedwarn ("%qD is not defined outside of function scope", decl); return decl; } |