GCC选项强制ANSI C标准检查? [英] GCC options to enforce Ansi C standard check?
本文介绍了GCC选项强制ANSI C标准检查?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将用什么gcc的选项来执行ANSI C(C99)警告/错误?
海湾合作委员会(GCC)3.4.2(MinGW的特)
What gcc options shall I use to enforce ANSI C (C99) warnings/errors? gcc (GCC) 3.4.2 (mingw-special)
我使用:
GCC -pedantic -ansi -std = C99
这是正确的?
I'm using: gcc -pedantic -ansi -std=c99 is this correct?
推荐答案
的 -ansi
标记与 -std = C89 代名词code>标记。
只需使用 -std = C99
与 -pedantic
应该足够了。
Just using -std=c99
with -pedantic
should be sufficient.
当有疑问,可以随时参考GCC文档。由于GCC 3.4.2,阅读章 2 - 语言标准,由GCC 支持
When in doubt, you can always refer to the GCC documentation. As of GCC 3.4.2, the chapter to read is 2 - Language Standards Supported by GCC.
这篇关于GCC选项强制ANSI C标准检查?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文