Home > Software engineering >  Undo -Werror for a particular warning
Undo -Werror for a particular warning

Time:11-13

I use -Werror ... -Wno-unknown-pragmas compiler flags (cause I don't need unknown pragmas to cause an error).

However, this silences all unknown pragma warnings.

Is there a way to produce -Wunknown-pragmas warnings while not turning them into errors, and to apply -Werror to all other warnings.

CodePudding user response:

-Werror -Wno-error=unknown-pragmas should do the trick.

  • Related