This code:
struct foo { typedef int f; };
int main() {
foo g;
typeof(g)::f bar;
typedef
typeof(g) h;
h::f baz;
return 0;
}
gets:
s3:~/ootbc/personal/ivan$ g++ foo.cc
foo.cc: In function int main():
foo.cc:4: error: expected initializer before bar
--
Summary: typeof doesn't act like a type in "::"
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43285