开发者

gcc compilation flag

hi everybody out there can any on\e tell me what is -pedantic flag in gcc ? like we use at command line gcc -pedantic filename.c. i don't know why we use -pedantic flag ? plea开发者_开发问答se explain with example.


-Wall

Gcc will display all the "GNU" warnings

-ansi

Gcc will display all the ANSI diagnostics that GNU agree with

-pedantic

Gcc will display more ANSI diagnostics which GNU doesn't necessarily agree with.


The pedantic flag causes the compiler to do extra error checking, which makes it flag problems in your code that it might otherwise ignore, and it also turns off some GCC extensions. Using it is A Good Thing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜