https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116050
Bug ID: 116050 Summary: Passing invalid option to gcc with --version results in exit status of 0 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: prathamesh3492 at gcc dot gnu.org Target Milestone: --- Hi, gcc -foo results in following error: error: unrecognized command-line option '-foo' and results in exit status of 1. However, gcc -foo --version prints above error message followed by version info and results in exit status of 0. I was wondering if it's a bug to have exit status of 0 for gcc <invalid opt> --version or is that intentional ? Thanks, Prathamesh