From 5ebbb72c205cff26072a2f381a3fe92e26ab8257 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 1 Aug 2018 12:09:33 +0000 Subject: =?UTF-8?q?re=20PR=20c++/86661=20(g++=20ICE:tree=20check:=20expect?= =?UTF-8?q?ed=20tree=20that=20contains=20=E2=80=98decl=20minimal=E2=80=99?= =?UTF-8?q?=20structure,=20have=20=E2=80=98overload=E2=80=99=20in=20note?= =?UTF-8?q?=5Fname=5Fdeclared=5Fin=5Fclass,=20at=20cp/class.c:8288)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /cp 2018-08-01 Paolo Carlini PR c++/86661 * class.c (note_name_declared_in_class): Use location_of in permerror instead of DECL_SOURCE_LOCATION (for OVERLOADs). /testsuite 2018-08-01 Paolo Carlini PR c++/86661 * g++.dg/lookup/name-clash12.C: New. From-SVN: r263207 --- gcc/cp/class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/cp/class.c') diff --git a/gcc/cp/class.c b/gcc/cp/class.c index c03a82b..de59831 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -8285,7 +8285,7 @@ note_name_declared_in_class (tree name, tree decl) A name N used in a class S shall refer to the same declaration in its context and when re-evaluated in the completed scope of S. */ - if (permerror (DECL_SOURCE_LOCATION (decl), + if (permerror (location_of (decl), "declaration of %q#D changes meaning of %qD", decl, OVL_NAME (decl))) inform (location_of ((tree) n->value), -- cgit v1.1