http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56955
Bug #: 56955
Summary: documentation for attribute malloc contradicts itself
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: n
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56956
Bug #: 56956
Summary: ftrapv traps on valid abs-like code
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Pri
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56955
--- Comment #2 from Dan Gohman 2013-04-14 19:47:42
UTC ---
(In reply to comment #1)
> I think it is talking about the memory returned by malloc/calloc will not
> point
> to another memory location while realloc can.
I agree that's esse
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56956
--- Comment #2 from Dan Gohman 2013-04-15 03:53:10
UTC ---
(In reply to comment #1)
> I think 'x' can not present negative value.
The unary minus operator is defined for unsigned types. It doesn't produce
signed overflow.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56956
--- Comment #3 from Dan Gohman 2013-04-15 03:54:32
UTC ---
Pulling the unary minus out into a separate statement, like this:
uint64_t y = -x;
return x <= INT64_MAX ? x : -y;
causes the program to execute correctly.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56956
--- Comment #5 from Dan Gohman 2013-04-15 05:12:30
UTC ---
(In reply to comment #4)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > I think 'x' can not present negative value.
> >
> > The unary minus operator is defined for unsign
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56956
--- Comment #6 from Dan Gohman 2013-04-15 05:14:27
UTC ---
(In reply to comment #3)
> Pulling the unary minus out into a separate statement, like this:
>
> uint64_t y = -x;
> return x <= INT64_MAX ? x : -y;
>
> causes the program
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56955
--- Comment #4 from Dan Gohman 2013-04-15 14:53:06
UTC ---
(In reply to comment #3)
> Well, it _is_ actually about the content. There must be no way to compute
> a valid pointer to another object from the contents of the pointed-to
> mem