[Haskell-cafe] rounding and undefined behavior

Matt Peddie mpeddie at gmail.com
Wed Feb 27 23:31:45 UTC 2019


Hi Neil,

Did you call GCC with optimizations enabled?  For me it returns 32767
if I enable optimizations and 0 if I don't.  Clang returns 0
independent of any flag changes I tried.  Bummer!

Regards

Matt

On Thu, Feb 28, 2019 at 9:19 AM Neil Mayhew
<neil_mayhew at users.sourceforge.net> wrote:
>
> On my machine, your program outputs 32767 with GCC (7.4.0) and 0 with Clang (5.0.2).
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.


More information about the Haskell-Cafe mailing list