From: paolo Date: Sat, 12 Jan 2019 21:59:50 +0000 (+0000) Subject: /cp X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b6446c3562ccb0266f93622987ab94b2561a70a;p=thirdparty%2Fgcc.git /cp 2019-01-12 Paolo Carlini * decl.c (cp_finish_decl): Improve error location. * decl2.c (grokfield): Likewise, improve two locations. /testsuite 2019-01-12 Paolo Carlini * g++.dg/cpp0x/pr62101.C: Test locations too. * g++.dg/inherit/pure1.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267888 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/g++.dg/inherit/pure1.C b/gcc/testsuite/g++.dg/inherit/pure1.C index 364369b85e19..fd81ff033c7f 100644 --- a/gcc/testsuite/g++.dg/inherit/pure1.C +++ b/gcc/testsuite/g++.dg/inherit/pure1.C @@ -2,18 +2,19 @@ // Origin: Volker Reichelt // { dg-do compile } -void foo0() = 0; // { dg-error "like a variable" } +void foo0() = 0; // { dg-error "6:function .void foo0\\(\\). is initialized like a variable" } virtual void foo1() = 0; // { dg-error "1:'virtual' outside class" } -// { dg-error "like a variable" "" { target *-*-* } .-1 } +// { dg-error "14:function .void foo1\\(\\). is initialized like a variable" "" { target *-*-* } .-1 } struct A { - void foo2() = 0; // { dg-error "non-virtual" } - static void foo3() = 0; // { dg-error "static member" } + void foo2() = 0; // { dg-error "8:initializer specified for non-virtual method" } + static void foo3() = 0; // { dg-error "15:initializer specified for static member function" } virtual static void foo4() = 0; // { dg-error "both 'virtual' and 'static'" } virtual void foo5() = 0; // { dg-error "base class" } }; struct B : A { - static void foo5() = 0; // { dg-error "static member|declared" } + static void foo5() = 0; // { dg-error "15:initializer specified for static member function" } +// { dg-error "declared" "" { target *-*-* } .-1 } };