public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/6190: T::C.X is accepted, although it should read T::C::X
@ 2002-04-05  9:46 reichelt
  0 siblings, 0 replies; 2+ messages in thread
From: reichelt @ 2002-04-05  9:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         6190
>Category:       c++
>Synopsis:       T::C.X is accepted, although it should read T::C::X
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 05 09:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Volker Reichelt
>Release:        gcc version 3.1 20020325 (prerelease)
>Organization:
>Environment:
i686-pc-linux-gnu, mips-sgi-irix6.5
>Description:
The following code, although illegal, is accepted by g++
(even with -Wall -W -pedantic turned on):

----------------------------snip here-----------
struct A { enum { X=4 }; };
struct B { typedef A C; };
template <class T> int foo () { return T::C.X; } // wrong, should be T::C::X
int main() { return foo<B>(); }
----------------------------snip here-----------

Note that the correct version is also accepted by g++.
(This is at least better than 2.95.x and 3.0.x which
accepted the illegal version and rejected the legal one.)

B::C.X is rejected as it should be.
>How-To-Repeat:
g++ bug.cpp
>Fix:

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


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

* Re: c++/6190: T::C.X is accepted, although it should read T::C::X
@ 2002-06-05  9:19 lerdsuwa
  0 siblings, 0 replies; 2+ messages in thread
From: lerdsuwa @ 2002-06-05  9:19 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, reichelt

Synopsis: T::C.X is accepted, although it should read T::C::X

State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Wed Jun  5 09:19:48 2002
State-Changed-Why:
    Confirmed.

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


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

end of thread, other threads:[~2002-06-05 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-05  9:46 c++/6190: T::C.X is accepted, although it should read T::C::X reichelt
2002-06-05  9:19 lerdsuwa

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).