如何检查使用的是c99,而不是gnu99
我想在编译过程中添加一条警告消息,警告用户应该使用gnu99而不是c99(我使用的是匿名结构,似乎它在c99中根本不存在)。
我发现:
#if __STDC_VERSION__ >= 199901L
但是这个测试对于c99和gnu99是正确的。
我可以使用哪个预定义宏?
I want to add a warning message during the compilation to warn the user it should use gnu99 instead of c99 (I am using anonymous struct, and it seems it doesn't exist at all in c99).
I found that:
#if __STDC_VERSION__ >= 199901L
but this test is true for c99 and gnu99.
Which predefined macro could I use?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以自行检查:
You can check for yourself: