When a forward declared class is not found the error message describes it incorrectly as a struct. See below for an example.
I'd like to submit a patch to correctly display class. Let me know if such a patch would be considered. $ g++ -Wall -ggdb -O0 -o t test6.cpp test6.cpp: In function int main(): test6.cpp:8: error: invalid use of undefined type struct foobar test6.cpp:4: error: forward declaration of struct foobar File contains: ===================================== // g++ -Wall -ggdb -O0 -o t test6.cpp class foobar; int main() { foobar * o = new foobar; } ==================================== -- Summary: error says struct when it should say class Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jg at jguk dot org GCC build triplet: i686-gnu-linux GCC host triplet: i686-gnu-linux GCC target triplet: i686-gnu-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31489