struct foo{ typedef int bar; }; int main() { foo f; typeof(f)::bar i = 0; return 0; }
gets you: ~/ootbc/sim/test$ g++ foo.cc foo.cc: In function 'int main()': foo.cc:4: error: expected initializer before 'i' -- Summary: typeof fails Product: gcc Version: 4.1.0 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=30837