我在编译一个C++应用程序,它使用C库和GCC 4.7。非局部变量在C++中使用匿名类型警告
当我编译,我收到以下警告:
warning: non-local variable ‘const ptg_t param’ uses anonymous type
warning: ‘typedef const struct<anonymous> ptg_t’ does not refer to the unqualified type, so it is not used for linkage
C++为什么把它伪装成警告,其中c不? 有没有一种方法可以解决它,而无需更改定义了ptg_t param
的库头文件?
由于C++和C是具有不同规则的不同语言? – chris 2013-05-05 09:21:27