This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17395] New: Incorrect lookup for parameters
- From: "gdr at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Sep 2004 13:33:59 -0000
- Subject: [Bug c++/17395] New: Incorrect lookup for parameters
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
G++ is confused about the scope of function paramaters.
Here is a testcase
template<int> struct X { };
void fu(int a, X<sizeof(a)>) { } // #1
template<class T>
void bhar(T a, X<sizeof(a)>) { } // #2
int main()
{
int x;
X<sizeof(int)> y;
fu(x, y); // #3
bhar(x, y); // #4
}
g++ erroneously rejects #1 and #2.
Notice that Comeau online accepts everything except #3 -- but
it should have accepted it.
--
Summary: Incorrect lookup for parameters
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gdr at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: plateform independent
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17395