aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2019-01-08 09:41:36 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2019-01-08 09:41:36 +0000
commit30fa2068a3d4317b5b2282eb2e37e98aedfcbf4e (patch)
tree58729404710a899345234b2f3e6adf5af24eef53 /gcc/cp/decl.c
parente32ba3f7abf2f2be6cac6d9785a5e8cf9f2a47c5 (diff)
downloadgcc-30fa2068a3d4317b5b2282eb2e37e98aedfcbf4e.zip
gcc-30fa2068a3d4317b5b2282eb2e37e98aedfcbf4e.tar.gz
gcc-30fa2068a3d4317b5b2282eb2e37e98aedfcbf4e.tar.bz2
decl.c (start_decl): Improve permerror location.
/cp 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com> * decl.c (start_decl): Improve permerror location. /testsuite 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/diagnostic/out-of-class-redeclaration.C: New. From-SVN: r267675
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index f456c07..7e4e93c 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -5202,7 +5202,8 @@ start_decl (const cp_declarator *declarator,
if (DECL_EXTERNAL (decl) && ! DECL_TEMPLATE_SPECIALIZATION (decl)
/* Aliases are definitions. */
&& !alias)
- permerror (input_location, "declaration of %q#D outside of class is not definition",
+ permerror (declarator->id_loc,
+ "declaration of %q#D outside of class is not definition",
decl);
}