[cfe-dev] -Wfatal-errors

Chris Lattner clattner at apple.com
Tue Dec 22 15:13:49 PST 2009

On Dec 21, 2009, at 12:11 PM, Christian Adåker wrote:

> On Mon, Dec 21, 2009 at 9:17 AM, Chris Lattner <clattner at apple.com>  
> wrote:
>> On Dec 18, 2009, at 2:11 AM, Christian Adåker wrote:
>>> Hi.
>>> I was looking through the TODO file for some simple way of
>>> contributing to clang, and saw a note about the -Wfatal-errors flag.
>>> It turned out to be pretty straightforward to fix (by looking at
>>> -Werror), but I thought I'd send the patch here for comments in case
>>> I've missed something.
>> I don't think this is quite right: -pedantic-errors can map to  
>> errors as well in the MAP_IGNORE case right above it.  It's close  
>> though!
> Oops, that's right. Fixed. However, -Werror doesn't affect the
> -pedantic warnings in that way. Shouldn't they be similar?
> Also, I've implemented -Wfatal-errors=foo. However, I'm not quite sure
> how -Wno-fatal-errors=foo should work. In this patch, it always turns
> foo into an error, even if -Werror is not in effect. Is that ok?

Looks great, applied here:

A nice cleanup in that code would be to switch it to produce  
diagnostics for the error cases instead of using printf, would you be  
interested in tackling that too?


More information about the cfe-dev mailing list