[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

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍

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

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/49610

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年2月9日 上午1:17
下一篇 2023年2月9日 上午1:17

相关推荐