toon-members
[Top][All Lists]
Advanced

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

Re: [Toon-members] Weird signed overflow warning


From: E. Rosten
Subject: Re: [Toon-members] Weird signed overflow warning
Date: Wed, 23 Jun 2010 16:28:36 +0100 (BST)
User-agent: Alpine 2.00 (LSU 1167 2008-08-23)

On Tue, 1 Jun 2010, Pekka Paalanen wrote:

Hi,

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

$ bash gcc-warnings2.cc

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

OK, this is a bit of a weird one, and I can't see any way to suppress the warning by changing the code. Essentially, it is warning that code written with broken assumptions about C++ may break. However, we aren't using broken assumptions.

C++ can only do compile-time size checks on static matrices, so TooN uses run-time checks for dynamically sized matrices. However, gcc has deduced that it can really determine the size of your matrices at compile time. This allows it to optimize away the size checks because it determines the test is always false. This is good, by the way.

-Ed



--
(You can't go wrong with psycho-rats.)(http://mi.eng.cam.ac.uk/~er258)

/d{def}def/f{/Times s selectfont}d/s{11}d/r{roll}d f 2/m{moveto}d -1
r 230 350 m 0 1 179{ 1 index show 88 rotate 4 mul 0 rmoveto}for/s 12
    d f pop 235 420 translate 0 0 moveto 1 2 scale show showpage



reply via email to

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