Making GCC and Other C++ Compilers Very Strict

后端 未结 7 735
深忆病人
深忆病人 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:47

    You can make pedantic warnings into errors with -pedantic-errors. This will prevent developers from ignoring it. For that matter you could make all warnings into errors as well with -Werror although that can be counter productive in some cases (maybe not in yours though).

    Overall, I think, as far as adhering to a strict standard goes, the -pedantic options are the most helpful.

提交回复
热议问题