Andrew Haley wrote:
Paolo Carlini writes:
I would like to understand the issue better, however...
What more is there to understand? It's an integer overflow. The
processor generates a trap on integer overflows during division
operations.
Just because the wrong code is generated for
Andrew Haley wrote:
Paolo Carlini writes:
I would like to understand the issue better, however...
What more is there to understand? It's an integer overflow. The
processor generates a trap on integer overflows during division
operations.
Yes, sorry, now I see that in the specific case
Paolo Carlini wrote:
Andrew Haley wrote:
Paolo Carlini writes:
I would like to understand the issue better, however...
What more is there to understand? It's an integer overflow. The
processor generates a trap on integer overflows during division
operations.
Yes, sorry, now I see that
Roberto Bagnara wrote:
No, Paolo: the result of INT_MIN % -1 is zero, according to the standard.
There is no overflow whatsoever involved. The overflow that you see is
simply an artifact of GCC that produces assembly code that does not
implement
remainder expressions correctly.
Ok, I
Paolo Carlini writes:
Roberto Bagnara wrote:
No, Paolo: the result of INT_MIN % -1 is zero, according to the standard.
There is no overflow whatsoever involved. The overflow that you
see is simply an artifact of GCC that produces assembly code that
does not implement remainder
Andrew Haley wrote:
Ok, I believe you. However, isn't true that, in general, because the
sign of the result is implementation defined,
The sign of the result of % is no longer (since C99) implementation-
defined.
I see. However, by default, I'm always talking about C++03...
Paolo.
Paolo Carlini writes:
Andrew Haley wrote:
Ok, I believe you. However, isn't true that, in general, because the
sign of the result is implementation defined,
The sign of the result of % is no longer (since C99) implementation-
defined.
I see. However, by default, I'm
Andrew Haley [EMAIL PROTECTED] writes:
| Paolo Carlini writes:
| Andrew Haley wrote:
|
| Ok, I believe you. However, isn't true that, in general, because the
| sign of the result is implementation defined,
|
| The sign of the result of % is no longer (since C99) implementation-
Andrew Haley [EMAIL PROTECTED] writes:
| Paolo Carlini writes:
| Andrew Haley wrote:
|
| Ok, I believe you. However, isn't true that, in general, because the
| sign of the result is implementation defined,
|
| The sign of the result of % is no longer (since C99) implementation-
Roberto Bagnara wrote:
Reading the thread Autoconf manual's coverage of signed integer
overflow portability I was horrified to discover about GCC's
miscompilation of the remainder expression that causes INT_MIN % -1
to cause a SIGFPE on CPUs of the i386 family. Are there plans to
fix this bug
On Mon, Jan 15, 2007 at 10:34:23PM +0200, Michael Veksler wrote:
Roberto Bagnara wrote:
Reading the thread Autoconf manual's coverage of signed integer
overflow portability I was horrified to discover about GCC's
miscompilation of the remainder expression that causes INT_MIN % -1
to cause
101 - 111 of 111 matches
Mail list logo