https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86134
--- Comment #11 from Pádraig Brady <P at draigBrady dot com> --- I agree that -Wno-... should never be promoted to an error as we see with: $ echo 'int maint(){}' | gcc -S -x c -Wno-unknown-warning-option -Wall -Werror -Wextra -Wno-error=return-type - <stdin>: In function ‘maint’: <stdin>:1:1: warning: control reaches end of non-void function [-Wreturn-type] <stdin>: At top level: cc1: error: unrecognized command line option ‘-Wno-unknown-warning-option’ [-Werror] cc1: all warnings being treated as errors However it's worth noting that one can suppress the other warnings entirely that trigger the promotion. This may be ok as a workaround for some: $ echo 'int maint(){}' | gcc -S -x c -Wno-unknown-warning-option -Wall -Werror -Wextra -Wno-return-type -