diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2008-08-06 16:37:06 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2008-08-06 16:37:06 +0000 |
commit | 7e99f74bbbb709c118fef4991219f83e55bc9b98 (patch) | |
tree | 783902cef32fa8d98d51a37c7d2c4cc393628f93 /gcc/cp/decl.c | |
parent | 4eee656926d2ff1d11587c909a828267a5e3f40a (diff) | |
download | gcc-7e99f74bbbb709c118fef4991219f83e55bc9b98.zip gcc-7e99f74bbbb709c118fef4991219f83e55bc9b98.tar.gz gcc-7e99f74bbbb709c118fef4991219f83e55bc9b98.tar.bz2 |
re PR c++/26785 ("extra qualification" error gives line number of end of declaration)
2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 26785
* diagnostic.c (permerror_at): New.
* toplev.h (permerror_at): Declare.
cp/
* decl.c (grokdeclarator): Use explicit location with
permerror_at.
testsuite/
* g++.dg/warn/pr26785.C: New.
From-SVN: r138816
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 69fa647..4c340e2 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -8437,8 +8437,9 @@ grokdeclarator (const cp_declarator *declarator, friendp = 0; } else - permerror ("extra qualification %<%T::%> on member %qs", - ctype, name); + permerror_at (declarator->id_loc, + "extra qualification %<%T::%> on member %qs", + ctype, name); } else if (/* If the qualifying type is already complete, then we can skip the following checks. */ |