This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16235] New: fails to identify
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jun 2004 19:19:47 -0000
- Subject: [Bug c++/16235] New: fails to identify
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The problem occurs when a particular type ("Hide::Frob<sizeof(Hide::Frob<1>::Type)>::Type" - "Hide" is a namespace) is typedefed at file scope to the *same* name "Frob" as is used in the namespace to construct the type, and then used as an explicit typename argument to a call on a template function.
If the full type is used explicitly then it compiles, see allocator.hh:265. Or it is locally typedefed and the name used then it compiles; see allocator.hh:267. If it is typedefed at global scope to a random name and the name used then it compiles; see allocator.hh:268. If and only if the file scope typedef has that particular name does it fail. But the only other use of that identifier is inside a namespace and they should have no influence on each other. And if that name ("Frob") is used in a local typedef (not shown, try it) it compiles - the typedef must be at file scope to fail.
I have tried to create a simpler testcase for the template logic surrounding the call and have failed. Everything I do makes the bug go away; sorry.
Ivan
--
Summary: fails to identify
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16235