------- Comment #6 from rakdver at gcc dot gnu dot org 2006-04-19 16:32 ------- I do not think this PR is invalid:
int a[100]; int *p = &a[50]; p - 1 is well defined, and points to 50 - 1 th element of a, as standard specifies p + (-1) is also well defined, and points to 50 + (-1) th element, again according to standard. p + (unsigned) -1 is undefined, as there is no 50 + 4294967295 th element in a (the standard specifies that there cannot be any overflow in the computation). Andrew, please do not mark PRs as invalid until the people involved in the discussion do not agree on the common interpretation of the standard. -- rakdver at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27214