c++/10372: [3.4 regression] illegal access of non-existant-member A::i

reichelt@igpm.rwth-aachen.de reichelt@igpm.rwth-aachen.de
Thu Apr 10 21:26:00 GMT 2003


>Number:         10372
>Category:       c++
>Synopsis:       [3.4 regression] illegal access of non-existant-member A::i
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 10 21:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Volker Reichelt
>Release:        gcc 3.4-20030402
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
Mainline g++ accepts the following illegal code:

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

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

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

This is a regression w.r.t. the 3.3 branch.
For related issues see PR 9443 and PR 10371.
>How-To-Repeat:

>Fix:

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



More information about the Gcc-bugs mailing list