[Top][All Lists]

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

[Toon-members] Weird signed overflow warning

From: Pekka Paalanen
Subject: [Toon-members] Weird signed overflow warning
Date: Tue, 1 Jun 2010 13:33:49 +0300


my code produces a weird warning in TooN. The attached source file is a
minimal example triggering the warning:

$ bash 

+ g++ -O2 -Wall -Wextra -I.. -llapack -o gcc-warnings2

../TooN/internal/operators.hh: In instantiation of
'TooN::Internal::DivideType<const double, double, 1>':

../TooN/internal/operators.hh:86:   instantiated from
'TooN::Internal::Divide::Return<const double, double>'

../TooN/helpers.h:159:   instantiated from 'TooN::Vector<((Size ==
TooN::Dynamic) ? TooN::Dynamic : (Size - 1)), Precision,
TooN::Internal::VBase> TooN::project(const TooN::Vector<Size, P, B>&)
[with int Size = -0x00000000000000001, Precision = double, Base =
TooN::Internal::SliceVBase<1, TooN::Internal::Default,
TooN::Internal::Default, TooN::Internal::Default,
TooN::Internal::Default>]'   instantiated from here

../TooN/internal/operators.hh:43: warning: type qualifiers ignored on
function return type

../TooN/internal/slice_error.hh: In function 'int main()':

../TooN/internal/slice_error.hh:126: warning: assuming signed overflow
does not occur when assuming that (X - c) > X is always false

I am referring to the very last line of the warnings, about signed
overflow. I already touched the other issue in a previous email.
What makes this weird is that both of the two seemingly unrelated lines
in the source file are required to produce this warning.

TooN is from CVS today, g++ (Gentoo 4.3.4 p1.1, pie-10.1.5) 4.3.4.

Just wanted to let you know with the hope, that this cosmetic nuisance
would disappear.


Pekka Paalanen, M.Sc. (Eng.)   LUT/IT, room 6505
doctoral student     

Description: Text Data

reply via email to

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