Make one gcc warning an error?

前端 未结 5 1687
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-14 15:37

I get this warning from GCC:

warning: cannot pass objects of non-POD type \'class Something\' through \'...\'; call will abort at runtime

5条回答
  •  眼角桃花
    2020-12-14 16:20

    Sounds like there are a bunch of other warnings that you don't want to be turned into errors (using the -Werror flag). In general, its good practice to fix all warnings. Using -Werror forces this.

提交回复
热议问题