Making GCC and Other C++ Compilers Very Strict

后端 未结 7 752
深忆病人
深忆病人 2021-02-01 06:45

I\'m working on a large collaborative C++ project that is both developed and run on various flavors of Linux, OS X and Windows. We compile across these platforms with GCC, Visua

7条回答
  •  佛祖请我去吃肉
    2021-02-01 07:25

    As well as -pendantic you should also provide a -std switch. If you need a stricter compile then you should know what standard you are trying to conform to. Typically for current c++ this would be -std=c++98. ( -ansi performs a similar function in C++ mode, but -std= is more explicit.)

提交回复
热议问题