Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2016-05

A bit of background on compilers exploiting signed overflow

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

i thought this was a very interesting discussion...

https://gist.github.com/rygorous/e0f055bfb74e3d5f0af20690759de5a7

thanks to john carmack (@ID_AA_Carmack) for retweeting this from Fabian Giesen ‏(@rygorous)...

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted.
Jonas Maebe
to Unknown author
Show quoted text 6 lines
i thought this was a very interesting discussion... https://gist.github.com/rygorous/e0f055bfb74e3d5f0af20690759de5a7 thanks to john carmack (@ID_AA_Carmack) for retweeting this from Fabian Giesen ‏(@rygorous)...

The point is kind of irrelevant in case of FPC, because overflows (signed or unsigned) are not undefined here. Every type is guaranteed to exhibit the behaviour defined by 2's complement for its particular byte size.

Jonas

Unknown author
to Jonas Maebe
Jonas Maebe wrote 11 lines
wrote: > i thought this was a very interesting discussion... > > https://gist.github.com/rygorous/e0f055bfb74e3d5f0af20690759de5a7 > > thanks to john carmack (@ID_AA_Carmack) for retweeting this from Fabian > Giesen ‏(@rygorous)... The point is kind of irrelevant in case of FPC, because overflows (signed or unsigned) are not undefined here. Every type is guaranteed to exhibit the behaviour defined by 2's complement for its particular byte size.

ahhh... i was kinda hoping that this would be the case... if it weren't, maybe a li'l something to bring it to the attention of the devs...

strong typing for the win, again! :)

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted.