[m-dev.] type punning with recent versions of gcc

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Dec 28 10:42:00 AEDT 2009

On Sun, 27 Dec 2009, Julien Fischer wrote:

> On Thu, 24 Dec 2009, Zoltan Somogyi wrote:
>> On 24-Dec-2009, Mark Brown <mark at csse.unimelb.edu.au> wrote:
>>> Is it worth trying to fix the Mercury libraries to avoid the type-punning
>>> warnings with recent versions of gcc?  There are lots of these, and at 
>>> least
>>> some of them seem to cause either mmc or compiled programs to seg fault.
>>> I think it would be better to just pass -fno-strict-aliasing to whatever
>>> compilers support it.  Any problems with that?
> -fno-strict-aliasing is available in every version of GCC
> that we support now (2.95 onwards), so it should just be specified
> whenever the C compiler type is GCC.

I've committed a patch which does this.
(Mark, this appears to fix the problems with gcc 4.3 and G12 that we
spoke about in person.)

mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au

More information about the developers mailing list