c++/9795: [3.4 regression] botched name lookup in templates
bangerth@ticam.utexas.edu
bangerth@ticam.utexas.edu
Fri Feb 21 23:56:00 GMT 2003
>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:
More information about the Gcc-bugs
mailing list