I always compile with -Wall -Wextra -Werror.
However, many times as I do quick compile tests I need to ignore the -Wunused suite of errors. For various reasons, I want to see them as warnings and not errors while leaving all other warnings as errors.
-Wno-unused of course doesn't display any warning, so it is not what I need.
The one I thought is the solution -Wno-error=unused unfortunately doesn't seem to work (they are still reported as errors),
Individually setting the flags (e.g.,
-Wno-error=unused-variable
) works as expected (reported as warning only).
So is there a way to make them warnings while leaving -Werror
without to specify all the suit of options -Wno-error=unused-...
individually?
Is the behavior of -Werro -Wno-error=unused
a bug?
GCC with -Werror and -Wno-error=unused