From c6b31e7228ba6f30dc6acbd4eb9908d1f24f2d5e Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 1 Dec 2015 15:35:36 -0500 Subject: [PATCH 20/26] FIXME: fix g++.dg/template/pseudodtor3.C --- gcc/cp/parser.c | 1 + gcc/testsuite/g++.dg/template/pseudodtor3.C | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 9e82e66..042c854 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -5099,6 +5099,7 @@ cp_parser_primary_expression (cp_parser *parser, id_expr_token->location)); if (error_msg) cp_parser_error (parser, error_msg); + decl.set_location (id_expr_token->location); return decl; } diff --git a/gcc/testsuite/g++.dg/template/pseudodtor3.C b/gcc/testsuite/g++.dg/template/pseudodtor3.C index 202182f..8700bb9 100644 --- a/gcc/testsuite/g++.dg/template/pseudodtor3.C +++ b/gcc/testsuite/g++.dg/template/pseudodtor3.C @@ -11,7 +11,7 @@ struct A template struct B { T &foo (); - B () { foo.~T (); } // { dg-error "10:invalid use of member" } + B () { foo.~T (); } // { dg-error "15:invalid use of member" } }; B b; @@ -19,7 +19,7 @@ B b; template struct C { T t; - C () { t.~S (); } // { dg-error "10:is not of type" } + C () { t.~S (); } // { dg-error "13:is not of type" } }; C c; -- 1.8.5.3