How can I compile only standard C++ with GNU g++?

后端 未结 1 1433
执笔经年
执笔经年 2021-01-18 08:25

There are some extensions in the GNU g++ compilers such as VLA (variable length arrays), even though those features are not C++ standards.

So if I need to compile a

相关标签:
1条回答
  • 2021-01-18 09:10

    Pass the -pedantic-errors flag. Be sure to set a standard with -std=, such as -std=c++14. This works in clang as well.

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