Came across this head-scratcher in building Qt with GCC 4.2.0. Heavily simplified version:
foo.cxx: typedef void (*funcptr)(void); typedef void GLvoid; typedef GLvoid (*_GLUfuncptr)(GLvoid); int foo(void) { return 1; } $ g++ -c foo.cxx foo.cxx:4: error: '<anonymous>' has incomplete type foo.cxx:4: error: invalid use of 'GLvoid' Compiles fine with 4.1.2 and 2.95.4. -- Summary: Error from simple typedef/void combination Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: skunk at iskunk dot org GCC build triplet: i386-unknown-freebsd4.8 GCC host triplet: i386-unknown-freebsd4.8 GCC target triplet: i386-unknown-freebsd4.8 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32364