This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/9795: [3.4 regression] botched name lookup in templates
- From: bangerth at ticam dot utexas dot edu
- To: gcc-gnats at gcc dot gnu dot org
- Date: 21 Feb 2003 23:51:19 -0000
- Subject: c++/9795: [3.4 regression] botched name lookup in templates
- Reply-to: bangerth at ticam dot utexas dot edu
>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: