bug-gnulib
[Top][All Lists]
Advanced

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

Re: large integer truncation in regex module


From: Jim Meyering
Subject: Re: large integer truncation in regex module
Date: Mon, 26 Mar 2012 07:33:01 +0200

Gianluigi Tiesi wrote:
> On 25/03/2012 6.58, Paul Eggert wrote:
>> On 03/24/2012 09:28 PM, Gianluigi Tiesi wrote:
>>> While compiling regex module one android I've discovered a problem
>>> that on other 32bit compiler is only a warning
>>>
>>> ...
>>> it's correct, but I think an ifdef may be used instead since
>>> BITSET_WORD_BITS is a define
>>
>>
>> Generally speaking we prefer 'if (xxx)' to '#if xxx' where either will
>> do, because the former is easier to read and reason about. If the only
>> problem with 'if (xxx)' is a bogus warning by some random compiler then
>> it's probably better to leave it alone (and get the compiler fixed....).
>
> I don't think assigning a 64bit integer constant in a 32bit variable
> type is a bogus warning,

It is bogus in this case because your compiler is warning
about what is called dead code: code that it can determine
will never be executed.

> and some software using gnulib like parted
> enable Werror by default

Gnu parted does not enable -Werror by default.
However, it is enabled if you configure with --enable-gcc-warnings.



reply via email to

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