This is the mail archive of the gcc-bugs@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]

c++/9795: [3.4 regression] botched name lookup in templates


>Number:         9795
>Category:       c++
>Synopsis:       [3.4 regression] botched name lookup in templates
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 21 23:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Wolfgang Bangerth
>Release:        unknown-1.0
>Organization:
>Environment:
present 3.4, 3.3 not affected
>Description:
Resulting from a typo...

This should absolutely not compile:
-----------------------------
struct A;

template <int> int f() { return A::a; }

int main () {
  return f<2>();
}
-----------------------------
A has no member A::a. However, present 3.4 happily groks
this and returns '0'. Don't anybody ask me what's going
on here...

W:
>How-To-Repeat:

>Fix:

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


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