$ cat ice.c extern __typeof(foo) foo __asm__("") ; void * foo (void) {}; $ gcc-4.2-HEAD -c ice.c -Wmissing-prototypes -o ice.o ice.c:1: error: 'foo' undeclared here (not in a function) ice.c:2: internal compiler error: tree check: expected function_type or method_type, have integer_type in start_function, at c-decl.c:6039 Please submit a full bug report, with preprocessed source if appropriate.
The ICE naturally goes away with -Wno-missing-prototype. Maybe related to PR 27719 -- Summary: ICE with -Wmissing-prototypes Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: aldot at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28299