使用以下命令
gcc -c -Wall -Wextra -pedantic -ansi -std=c99 -fstack-protector-all -fstack-check -O3 root.c -o rootTESTOBJECT
我收到编译器警告 root.h:76:22: warning: ISO C does not permit named variadic macros
72 #ifdef Debug
73 #include <stdio.h>
74 #define crumb(phrase0...) printf(phrase0)
75 #else
76 #define crumb(phrase0...)
77 #endif
我相信选项 -ansi -std=c99 允许使用可变参数宏,无论如何它都根据文档...
我尝试将第 76 行编辑为
76 #define crumb(phrase0...) printf("")
看看这是否解决了警告但没有喜悦。
编译器版本是 Apple 的 gcc,版本 4.2.1 我不确定我是否需要对此过于担心,但我真的不喜欢警告。我错过了什么旗帜?