user2052436
user2052436

Reputation: 4765

Undo -Werror for a particular warning

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.

Upvotes: 1

Views: 230

Answers (1)

Siguza
Siguza

Reputation: 23850

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

Upvotes: 5

Related Questions