On Thu, Aug 11, 2011 at 10:36 PM, Joe Buck joe.b...@synopsys.com wrote:
On Thu, Aug 11, 2011 at 1:58 PM, Joseph S. Myers
jos...@codesourcery.com wrote:
-ftrapv and -fwrapv should have no effect on pointer subtraction.
Gaby writes:
Yes!
Wouldn't it suffice to convert the pointers to
So it seems like we agreed that this is a problem that should be fixed.
Shall I create a bug report suggesting for it?
Am Friday, 12. August 2011, 09:32:11 schrieb Richard Guenther:
On Thu, Aug 11, 2011 at 10:36 PM, Joe Buck joe.b...@synopsys.com wrote:
On Thu, Aug 11, 2011 at 1:58 PM, Joseph
Dear gcc developers,
this is about an issue that popped up in a verification project [1] based on
LLVM, but it seems to be already present in the gimple code, before llvm-gcc
transforms the gimple code to LLVM-IR.
In short:
Calculating the difference of two pointers seems to be treated by gcc
On Thu, Aug 11, 2011 at 5:15 PM, Florian Merz florian.m...@kit.edu wrote:
Dear gcc developers,
this is about an issue that popped up in a verification project [1] based on
LLVM, but it seems to be already present in the gimple code, before llvm-gcc
transforms the gimple code to LLVM-IR.
In
Thanks for your reply Richard, but I'm not satisfied with your answer, yet. :-)
If I'm right, then the problem I'm refering to doesn't require large objects.
See below for more.
Am Thursday, 11. August 2011, 17:48:26 schrieb Richard Guenther:
On Thu, Aug 11, 2011 at 5:15 PM, Florian Merz
On Thu, Aug 11, 2011 at 6:05 PM, Florian Merz florian.m...@kit.edu wrote:
Thanks for your reply Richard, but I'm not satisfied with your answer, yet.
:-)
If I'm right, then the problem I'm refering to doesn't require large objects.
See below for more.
Am Thursday, 11. August 2011, 17:48:26
On Thu, Aug 11, 2011 at 09:05:19AM -0700, Florian Merz wrote:
If I remember the standard correctly, pointer subtraction is valid if both
pointers point to elements of the same array or to one past the last element
of the array. According to this 0x8000 - 0x7FFF should be a valid
On Thu, Aug 11, 2011 at 7:13 PM, Joe Buck joe.b...@synopsys.com wrote:
On Thu, Aug 11, 2011 at 09:05:19AM -0700, Florian Merz wrote:
If I remember the standard correctly, pointer subtraction is valid if both
pointers point to elements of the same array or to one past the last element
of the
Am Thursday, 11. August 2011, 19:15:41 schrieb Richard Guenther:
On Thu, Aug 11, 2011 at 7:13 PM, Joe Buck joe.b...@synopsys.com wrote:
On Thu, Aug 11, 2011 at 09:05:19AM -0700, Florian Merz wrote:
If I remember the standard correctly, pointer subtraction is valid if
both pointers point to
On Thu, 11 Aug 2011, Richard Guenther wrote:
int x,y;
int main ()
{
char *a, *b;
__INTPTR_TYPE__ w;
if (x)
a = 0x7ffe;
else
a = 0x7fff;
if (y)
b = 0x8001;
else
b = 0x8000;
w = b - a;
return w;
}
indeed traps with -ftrapv for me
On Thu, Aug 11, 2011 at 12:15 PM, Richard Guenther
richard.guent...@gmail.com wrote:
On Thu, Aug 11, 2011 at 7:13 PM, Joe Buck joe.b...@synopsys.com wrote:
On Thu, Aug 11, 2011 at 09:05:19AM -0700, Florian Merz wrote:
If I remember the standard correctly, pointer subtraction is valid if both
On Thu, Aug 11, 2011 at 1:58 PM, Joseph S. Myers
jos...@codesourcery.com wrote:
-ftrapv and -fwrapv should have no effect on pointer subtraction.
Yes!
-- Gaby
On Thu, Aug 11, 2011 at 1:58 PM, Joseph S. Myers
jos...@codesourcery.com wrote:
-ftrapv and -fwrapv should have no effect on pointer subtraction.
Gaby writes:
Yes!
Wouldn't it suffice to convert the pointers to unsigned, do an unsigned
subtraction, and then convert the result to signed?
13 matches
Mail list logo