This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20551] New: "typeof" fails as qualifier
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Mar 2005 11:12:18 -0000
- Subject: [Bug c++/20551] New: "typeof" fails as qualifier
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In:
template<typename T>
struct F { typedef T G; };
template<typename U>
struct H {
static F<int> f;
typedef typeof(f) A;
typename A::G v1;
typename typeof(f)::G v3;
};
you get:
~/ootbc/members/src$ g++ foo.cc
foo.cc:8: error: expected nested-name-specifier before "typeof"
foo.cc:8: error: ISO C++ forbids declaration of `G' with no type
foo.cc:8: error: invalid use of `::'
foo.cc:8: error: expected `;' before "v3"
although the doc says that "typeof(...)" may be used anywhere a type may be.
Ivan
--
Summary: "typeof" fails as qualifier
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=20551