`clang -ansi` extensions

前端 未结 1 945
执念已碎
执念已碎 2021-01-13 02:25

I ran into an issue recently where the following toy example compiles cleanly using clang -ansi:

int main(void)
{
    for (int i = 0; 0; );
             


        
相关标签:
1条回答
  • 2021-01-13 03:10

    If you are trying to disable extensions in -ansi mode, then you want these warnings treated as errors: use -pedantic-errors instead of -pedantic, or -Werror (or both). For more fine-grained control over errors, see the Clang manual.

    0 讨论(0)
提交回复
热议问题