[C/C++]error: expected initializer before 'typedef'

This morning when I was trying bring some module written for embeded system under CppUtest.

In some header file there's platform specific code like: " extern volatile PDBMODSTR _PDBMOD @0xFFFFE002; " which cannot pass compilatin in gcc.

Thus I replaced all @ to // to comment the incompatiable @0xFFFFE002. Everything is expected to be working fine.

But when I compile, it stops at some "typedef union {}" in the header file and complains error: expected initializer before 'typedef'

Why? Oh no!  I commented out also the semicolon...

转载于:https://www.cnblogs.com/lifen/archive/2012/05/07/missing_semicolon.html

你可能感兴趣的:([C/C++]error: expected initializer before 'typedef')