public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/10371: [3.4 regression] misleading error message for illegal member access
@ 2003-04-27 12:36 Kriang Lerdsuwanakij
  0 siblings, 0 replies; 4+ messages in thread
From: Kriang Lerdsuwanakij @ 2003-04-27 12:36 UTC (permalink / raw)
  To: lerdsuwa; +Cc: gcc-prs

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

From: Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
To: gcc-gnats@gcc.gnu.org, reichelt@igpm.rwth-aachen.de, gcc-bugs@gcc.gnu.org,
        lerdsuwa@gcc.gnu.org, gcc-prs@gcc.gnu.org
Cc:  
Subject: Re: c++/10371: [3.4 regression] misleading error message for illegal
 member access
Date: Sun, 27 Apr 2003 19:40:06 +0700

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10371
 
 Patch submitted:
 
 	http://gcc.gnu.org/ml/gcc-patches/2003-04/msg02032.html
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++/10371: [3.4 regression] misleading error message for illegal member access
@ 2003-04-18 13:48 lerdsuwa
  0 siblings, 0 replies; 4+ messages in thread
From: lerdsuwa @ 2003-04-18 13:48 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, lerdsuwa, nobody, reichelt

Synopsis: [3.4 regression] misleading error message for illegal member access

Responsible-Changed-From-To: unassigned->lerdsuwa
Responsible-Changed-By: lerdsuwa
Responsible-Changed-When: Fri Apr 18 13:48:45 2003
Responsible-Changed-Why:
    Will investigate this bug.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10371


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++/10371: [3.4 regression] misleading error message for illegal member access
@ 2003-04-16 21:53 bangerth
  0 siblings, 0 replies; 4+ messages in thread
From: bangerth @ 2003-04-16 21:53 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, reichelt

Synopsis: [3.4 regression] misleading error message for illegal member access

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Wed Apr 16 21:53:27 2003
State-Changed-Why:
    Guess I agree

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10371


^ permalink raw reply	[flat|nested] 4+ messages in thread

* c++/10371: [3.4 regression] misleading error message for illegal member access
@ 2003-04-10 21:16 reichelt
  0 siblings, 0 replies; 4+ messages in thread
From: reichelt @ 2003-04-10 21:16 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10371
>Category:       c++
>Synopsis:       [3.4 regression] misleading error message for illegal member access
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 10 21:16:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Volker Reichelt
>Release:        gcc 3.4-20030402
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
Compiling the following code with "g++ -c" I get an
error message which is quite misleading IMHO:

----------------------snip here---------------------
struct A
{
    int i;
};

template <int> struct B
{
    int foo() { return A::i; }
};

void bar() { B<0>().foo(); }
----------------------snip here---------------------

msg.cc: In member function `int B<<anonymous> >::foo() [with int 
   <anonymous> = 0]':
msg.cc:11:   instantiated from here
msg.cc:8: error: 'struct B<0>' has no member named 'i'

We try to access "A::i" which is a member of A and not
of B<0> in an illegal fashion. There are (at least)
two ways to make the code legal: a) make "i" static or b)
derive "B" from "A".

Compilers on the release branch at least give a hint w.r.t. b):

msg.cc: In member function `int B<<anonymous> >::foo() [with int 
   <anonymous> = 0]':
msg.cc:11:   instantiated from here
msg.cc:8: error: type `A' is not a base type for type `B<0>'

Although this is only correct in some cases, I rate the new
error message as a regression.

For related issues see PR 9443.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-04-27 12:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-27 12:36 c++/10371: [3.4 regression] misleading error message for illegal member access Kriang Lerdsuwanakij
  -- strict thread matches above, loose matches on Subject: below --
2003-04-18 13:48 lerdsuwa
2003-04-16 21:53 bangerth
2003-04-10 21:16 reichelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).