This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/9443: [3.4 regression] ICE when accessing a nonstatic member as A::i


The following reply was made to PR c++/9443; it has been noted by GNATS.

From: "Giovanni Bajo" <giovannibajo at libero dot it>
To: "Volker Reichelt" <reichelt at igpm dot rwth-aachen dot de>
Cc: <gcc-gnats at gcc dot gnu dot org>,
	<gcc-bugs at gcc dot gnu dot org>,
	<nobody at gcc dot gnu dot org>,
	<larsbj at gullik dot net>,
	"Wolfgang Bangerth" <bangerth at ices dot utexas dot edu>
Subject: Re: c++/9443: [3.4 regression] ICE when accessing a nonstatic member as A::i
Date: Thu, 10 Apr 2003 22:17:45 +0200

 Volker Reichelt <reichelt at igpm dot rwth-aachen dot de> wrote:
 
 
 > For the record:
 
 I think this audit trail is too complex now. I'd rather split it up into
 smaller new bug reports and close this one. You can still have a link in the
 description to this PR in case it's really needed.
 
 > * The ICE in the case with "A::i" is fixed (mainline as of gcc 20030406).
 >   The error message, however, could still use some improvement:
 >
 >   PR9443A.cc: In member function `int B<<anonymous> >::foo() [with int
 >      <anonymous> = 0]':
 >   PR9443A.cc:15:   instantiated from here
 >   PR9443A.cc:12: error: 'struct B<0>' has no member named 'i'
 >
 >   We tried to access A::i and not B<0>::i as the error message suggests.
 >   This is as bad as the message on the 3.3 branch:
 >
 >   PR9443A.cc: In member function `int B<<anonymous> >::foo() [with int
 >    <anonymous> = 0]':
 >   PR9443A.cc:15:   instantiated from here
 >   PR9443A.cc:12: error: type `A' is not a base type for type `B<0>'
 >
 >   In fact you can make the code legal if you derive B from A, so this
 >   might actually help in some situations.
 
 This should be filed as a confusing error message / change request. I
 personally believe that mainline's message is even more confusing. The error
 message should also at least mention that A::i is not a static member.
 Comeau's error message is "a non-static member reference must be relative to
 a specific object".
 Would you please file this separately?
 
 > * The accepts-illegal bug in the case "A::j" still persists on mainline.
 >   I changed the synopsis to reflect the situation.
 
 This is a very serious regression in my opionion. Would you please post it
 in a separate and clear PR?
 
 >   The boost problems regarding the 3.3 branch are probably a different
 >   issue (an ICE in c_expand_expr, at c-common.c happens quite often -
 >   the reason for the failure is usually buried elsewhere).
 >   Alas there are no more recent results available on
 >
 >     http://cci.lbl.gov/boost/results/
 >
 >   The tests were performed with gcc 3.3-20030306. If the problems with the
 >   3.3 branch persist, we should probably have a look at it. Could you test
 >   it with a more recent compiler, Giovanni?
 
 Sure, will do. If you think they are not related, this PR can be closed once
 the new PRs are submitted.
 
 Giovanni Bajo
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]