Gcc has a versatile set of warning/error flags that let one tune its behavior, but there is one thing that it seems is currently not supported: the ability to have gcc abort on the first diagnostic, without losing information about whether that diagnostic is a warning or an error.
One can use -Werror -Wfatal-errors to get abortion on the first diagnostic, but then warnings like "suggest parentheses around && within ||" are reported as errors. Ideally, there would be a flag -Wfatal-warnings, which would cause the compiler to abort compilation on the first warning. One could then use -Wfatal-errors -Wfatal-warnings to get abortion on the first diagnostic without losing information about whether that diagnostic is a warning or an error. While I believe this feature would be more generally useful, the particular use case I'm requesting this for is geordi ( http://www.eelis.net/geordi/ ), a popular educational IRC C++ bot which compiles C++ code snippets with gcc and reports the first diagnostic (if any). Since only the first diagnostic is needed, geordi uses -Werror -Wfatal-errors to reduce its response time, but this means it misreports warnings like the one mentioned above, as errors. Having -Wfatal-warnings would trivially solve this without imposing a responsiveness penalty. I realize this request might be a bit of a stretch, but I thought I'd give it a shot. Thanks for your time. -- Summary: [feature request] -Wfatal-warnings Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gcc-bugzilla at contacts dot eelis dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36778