Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gcc treat all warnings as errors EXCEPT X

Tags:

gcc

warnings

For reasons best left unmentioned, I want to treat all warnings as erros, except for a single warning (deprecated) which I would like to tread as a warning.

Is there any more convenient way to do this than listing out all the warnings I want to treat as errors by hand?

like image 525
Spacemoose Avatar asked Jul 17 '15 06:07

Spacemoose


1 Answers

You can do -Werror -Wno-error=deprecated.

like image 163
Tom Tromey Avatar answered Feb 07 '23 17:02

Tom Tromey