-Wfatal-errors

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

-Wfatal-errors

Christian Adåker
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.
If everything's fine I'll do the -Wfatal-errors= version too. That
should be pretty much mimicking -Werror=, right?

//Christian Adåker

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

fatal-errors.diff (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: -Wfatal-errors

Chris Lattner

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!

> If everything's fine I'll do the -Wfatal-errors= version too. That
> should be pretty much mimicking -Werror=, right?

Yep, exactly, should be very straight-forward.

Thanks for working on this!

-Chris
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: -Wfatal-errors

Christian Adåker
On Mon, Dec 21, 2009 at 9:17 AM, Chris Lattner <[hidden email]> 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?

//Christian

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

fatal-errors.diff (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: -Wfatal-errors

Chris Lattner

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

> On Mon, Dec 21, 2009 at 9:17 AM, Chris Lattner <[hidden email]>  
> 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:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20091221/025732.html

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?

-Chris
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: -Wfatal-errors

Christian Adåker
On Wed, Dec 23, 2009 at 12:13 AM, Chris Lattner <[hidden email]> wrote:
> 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?

Sure. I also took the liberty of updating a few comments and the TODO.

//Christian

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

remove-fprintf.diff (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: -Wfatal-errors

Chris Lattner

On Dec 23, 2009, at 1:00 AM, Christian Adåker wrote:

> On Wed, Dec 23, 2009 at 12:13 AM, Chris Lattner <[hidden email]>  
> wrote:
>> 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?
>
> Sure. I also took the liberty of updating a few comments and the TODO.

Very nice, thanks!
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20091221/025781.html

-Chris
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev