我正在编译一个使用 GCC 4.7 的 C 库的 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
定义的库头文件的情况下修复它?