https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86134
Bug ID: 86134 Summary: earlier error causes followup diagnostic about unknown -Wno-* options Product: gcc Version: 8.1.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- > echo 'int main(){' | gcc -S -x c -Wno-unknown-warning-option - <stdin>: In function ‘main’: <stdin>:1:1: error: expected declaration or statement at end of input <stdin>: At top level: cc1: warning: unrecognized command line option "-Wno-unknown-warning-option" [enabled by default] compared to > echo 'int main(){}' | gcc -S -x c -Wno-unknown-warning-option - with -Werror the diagnostic on the unrecognized command line option is an error as well.