--- Comment #13 from pinskia at gcc dot gnu dot org 2010-02-17 18:12
---
Use -fwrapv if you want signed integer overflow being defined the way you want
it being defined. That is the whole point of that flag. The reason why GCC
acts the way it acts by default is to allow more optimizat
--- Comment #12 from paolo dot carlini at oracle dot com 2010-02-17 17:58
---
.
--
paolo dot carlini at oracle dot com changed:
What|Removed |Added
Status|UN
--- Comment #11 from 0xe2 dot 0x9a dot 0x9b at gmail dot com 2010-02-17
17:52 ---
(In reply to comment #10)
> Please stop reopening. 6.3.1.3 is about casts between integer types.
> Signed integer overflow is even mentioned as an example of undefined behavior
> in 3.4.3.
Well, look, ma
--- Comment #10 from jakub at gcc dot gnu dot org 2010-02-17 14:41 ---
Please stop reopening. 6.3.1.3 is about casts between integer types.
Signed integer overflow is even mentioned as an example of undefined behavior
in 3.4.3.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43089
--- Comment #9 from paolo dot carlini at oracle dot com 2010-02-17 14:39
---
.
--
paolo dot carlini at oracle dot com changed:
What|Removed |Added
Status|UNC
--- Comment #8 from 0xe2 dot 0x9a dot 0x9b at gmail dot com 2010-02-17
14:16 ---
(In reply to comment #7)
> Where the compiler always chooses some particular implementation is
> implementation defined behavior, not undefined behavior. Undefined behavior
> is
> always just that, undefi
--- Comment #7 from jakub at gcc dot gnu dot org 2010-02-16 18:26 ---
Where the compiler always chooses some particular implementation is
implementation defined behavior, not undefined behavior. Undefined behavior is
always just that, undefined.
--
jakub at gcc dot gnu dot org chang
--- Comment #6 from pinskia at gmail dot com 2010-02-16 17:51 ---
Subject: Re: Optimizer ignores type in a conversion
Sent from my iPhone
On Feb 16, 2010, at 9:37 AM, "0xe2 dot 0x9a dot 0x9b at gmail dot com"
wrote:
>
>
> --- Comment #5 from 0xe2 dot 0x9a dot 0x9b at gmail d
Sent from my iPhone
On Feb 16, 2010, at 9:37 AM, "0xe2 dot 0x9a dot 0x9b at gmail dot com"
wrote:
--- Comment #5 from 0xe2 dot 0x9a dot 0x9b at gmail dot com
2010-02-16 17:37 ---
(In reply to comment #4)
There is nothing to fix. Your program triggers undefined
behavior.
--- Comment #5 from 0xe2 dot 0x9a dot 0x9b at gmail dot com 2010-02-16
17:37 ---
(In reply to comment #4)
> There is nothing to fix. Your program triggers undefined behavior. It can do
> anything, which can include something you'd expect, or something completely
> different and it can
--- Comment #4 from jakub at gcc dot gnu dot org 2010-02-16 11:56 ---
There is nothing to fix. Your program triggers undefined behavior. It can do
anything, which can include something you'd expect, or something completely
different and it can depend on compiler options, position of st
--- Comment #3 from 0xe2 dot 0x9a dot 0x9b at gmail dot com 2010-02-16
11:23 ---
(In reply to comment #2)
>
> If I were to modify the test case like this:
>
> int i = ab.b;
> b2 = i + i;
>
> I would be ALSO triggering undefined behavior. But the modified test-case
> would
> succeed
--- Comment #2 from 0xe2 dot 0x9a dot 0x9b at gmail dot com 2010-02-16
10:59 ---
(In reply to comment #1)
> 0x7fff + 1 overflows. Signed overflow invokes undefined behavior.
Like so what? Is this your way of saying "I am not going to fix it"? Do you
find it convenient to hide your
--- Comment #1 from rguenth at gcc dot gnu dot org 2010-02-16 10:16 ---
0x7fff + 1 overflows. Signed overflow invokes undefined behavior.
Use -fwrapv if you want wrapping signed overflow.
--
rguenth at gcc dot gnu dot org changed:
What|Removed
14 matches
Mail list logo