Validate broken on Snow Leopard and Mountain Lion

Christiaan Baaij christiaan.baaij at gmail.com
Thu Nov 14 09:57:02 UTC 2013


Looking at the  "offending" c-code of the primitive library, with my limited C knowledge and understanding of this strict-aliasing, I think the gcc warning on Lion is correct: the strict-aliasing rule is violated.
However, after asking my colleague, we don't think the gcc optimizer will break the code in this particular case.

It's weird that the warning doesn't show on your linux install.
What version of gcc are you using on linux? Is it higher or lower than the on on OS X?

Changing line 22 in primitive-memops.c to:
const int *r = (const int *)(void *)&x;

Makes the warning go away.

For reference, my system:
OS X 10.8.5 (Mountain Lion), X Code 4.6.2, gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)


On Nov 14, 2013, at 5:23 AM, Carter Schonwald <carter.schonwald at gmail.com> wrote:

> Ben has an excellent point: 
> 
> if things are broken on mac, lets fix it!  Especially since we should be hitting RC status shortly.... any breakages should be smashed ASAP.
> 
> This does raise a point I hope we'll address more aggressively after the 7.8 release, namely trying to keep ghc less broken by default! GHC being really really really broken between releases is probably the single HUGEST barrier to more people getting involved in helping GHC dev. And I think thats a huge problem we need to take more seriously. 
> 
> 
> 
> 
> On Wed, Nov 13, 2013 at 11:09 PM, Ben Lippmeier <benl at ouroborus.net> wrote:
> 
> On 13/11/2013, at 8:02 PM, Christiaan Baaij wrote:
> 
> > Does validate work for the DPH packages on Linux?
> 
> "sh validate" runs fine on my Linux machine, but neither of my Macs.
> 
> I can also run the dph tests manually on Linux, and they work fine.
> 
> Ben.
> 
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
> 



More information about the ghc-devs mailing list