[Bug target/81801] [PATCH] Difference of two pointers generates signed overflow

2017-08-11 Thread oss at malat dot biz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81801 --- Comment #3 from Petr Malat --- After reading the related part of the standard (actually, N1570 draft), I'm not so sure about this. The semantics section in 6.5.6 says pointers have to be from the same object and also the result must fit into

[Bug c/81801] New: [PATCH] Difference of two pointers generates signed overflow

2017-08-10 Thread oss at malat dot biz
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: oss at malat dot biz Target Milestone: --- Created attachment 41964 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41964&action=edit Correction + test SSH compiled with -ftrapv ab