Package Miscellaneous error installation on "x86_64-suse-linux-gnu".

Jaroslav Hajek highegg at gmail.com
Mon Dec 29 13:08:05 CST 2008


On Mon, Dec 29, 2008 at 7:47 PM, Sergei Steshenko <sergstesh at yahoo.com> wrote:
>
>
>
> --- On Mon, 12/29/08, Jaroslav Hajek <highegg at gmail.com> wrote:
>
>> From: Jaroslav Hajek <highegg at gmail.com>
>> Subject: Re: Package Miscellaneous error installation on "x86_64-suse-linux-gnu".
>> To: sergstesh at yahoo.com
>> Cc: "Zx♥ch.m" <zxoch.m at gmail.com>, bug-octave at octave.org
>> Date: Monday, December 29, 2008, 9:37 AM
>> On Mon, Dec 29, 2008 at 3:21 PM, Sergei Steshenko
>
>> What if, in the next version of gcc, a new
>> warning option
>> is implemented? Will that introduce bugs into a previously
>> unbuggy
>> code?
>
> Almost certainly the code _will_ become buggy.
>

What is almost certainly?



> I myself once file a bug report against 'gcc' - 'make check' for a
> library started to fail.
>
> In the end 'gcc' folks explained that 'gcc' started to treat integer
> overflows differently, and one could get the integer overflow warning
> while compiling the library.
>

I can give you a counter-example just as easily. When you compile
octave 3.0.x, g++ will warn you that "comparison is always false due
to limited range of integer type".
There is, however, nothing wrong with these comparisons and in fact
they are not easily avoidable (they're avoided in development sources,
but thanks to a complete rewrite). So, are they bugs? Comparing a char
to std::numeric_limits<int>::max () is perfectly correct c++, even
though the result is independent of the argument value.

Sometimes, the programmer simply knows more than the compiler issuing
a useless warning. Warning is exactly something you should pay
attention to, but adjusting a correct and clear code just to avoid a
compiler warning seems silly to me.

> Regards,
>  Sergei.
>
>
>
>



-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



More information about the Bug-octave mailing list