coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: avoid new GCC-7-exposed warnings


From: Pádraig Brady
Subject: Re: avoid new GCC-7-exposed warnings
Date: Sat, 15 Oct 2016 18:11:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 15/10/16 16:40, Jim Meyering wrote:
> On Sat, Oct 15, 2016 at 2:55 AM, Pádraig Brady <address@hidden> wrote:
>> On 15/10/16 05:47, Jim Meyering wrote:
>>> I tried to build the coreutils using very recent GCC 7, built from
>>> latest git, and encountered a few new warnings (errors when configured
>>> with --enable-gcc-warnings), so wrote the following to address them.
>>> With these, everything now compiles warning free:
>>
>> All look good.
>>
>> I had a similar idea to die() with errorx() at:
>> http://lists.gnu.org/archive/html/coreutils/2016-07/msg00038.html
> 
> The mixed semantics of "error" have been an annoyance for a long time.
> Do you prefer the "errorx" name over "die"?
> I have a slight preference for "die" because it is short and clear,
> but perhaps more at risk of collision with existing name in some
> project. When talking about this for grep, Paul proposed "dierror".
> Eventually, we'd like to move this into gnulib, so coming up with a
> good name is not an idle exercise.

die() is better. shorter and more obvious.
Also the implementation is better as it's not a runtime wrapper,
but a compile time check wrapper. I was just mentioning errorx()
because I thought the concept a good idea.

> 
>> It seems like die() would be good in more cases.
>> The two here:
>> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=558ce30
>> and the others noted by Bernhard:
>> http://lists.gnu.org/archive/html/coreutils/2016-07/msg00039.html
> 
> Definitely useful in many other places. That would be good for a
> follow-on patch. This one was focused on fixing warnings. I did not
> want to dilute it with the global no-semantic-change patch to switch
> to using "die" wherever possible.

True.
I'll do the follow up patch to use in more places.

thanks!
Pádraig




reply via email to

[Prev in Thread] Current Thread [Next in Thread]