This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
C++ PATCH to build_member_call for c++/525
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 04 Apr 2002 02:10:48 +0100
- Subject: C++ PATCH to build_member_call for c++/525
I used to think that we weren't supposed to disambiguate based on explicit
scope, since we don't for using declarations (a decision which I disagree
with, but whatever). I later learned that we do disambiguate based on
explicit scope, and fixed build_scoped_ref, but failed to fix
build_member_call at the same time.
Tested i686-pc-linux-gnu, applied 3.0 and 3.1 branches. I plan to fix the
trunk by making it use build_scoped_ref instead of reinventing the wheel.
2002-04-04 Jason Merrill <jason@redhat.com>
PR c++/525
* init.c (build_member_call): Convert to intermediate base even
with -pedantic.
*** init.c.~1~ Wed Apr 3 21:00:44 2002
--- init.c Wed Apr 3 21:30:46 2002
*************** build_member_call (type, name, parmlist)
*** 1496,1505 ****
decl = maybe_dummy_object (type, &basetype_path);
/* Convert 'this' to the specified type to disambiguate conversion
! to the function's context. Apparently Standard C++ says that we
! shouldn't do this. */
if (decl == current_class_ref
- && ! pedantic
&& ACCESSIBLY_UNIQUELY_DERIVED_P (type, current_class_type))
{
tree olddecl = current_class_ptr;
--- 1496,1503 ----
decl = maybe_dummy_object (type, &basetype_path);
/* Convert 'this' to the specified type to disambiguate conversion
! to the function's context. */
if (decl == current_class_ref
&& ACCESSIBLY_UNIQUELY_DERIVED_P (type, current_class_type))
{
tree olddecl = current_class_ptr;