guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should we compile Guile with -fno-strict-aliasing?


From: Andy Wingo
Subject: Re: Should we compile Guile with -fno-strict-aliasing?
Date: Sun, 29 Jan 2012 22:02:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Hi!

On Fri 27 Jan 2012 20:02, Mark H Weaver <address@hidden> writes:

> For many years, Linux (the kernel) has used the -fno-strict-aliasing
> compiler option to disable certain tricky optimizations that depend upon
> a very strict reading of the aliasing rules of modern C standards.  It
> turns out that it's quite difficult to write robust code in the presence
> of those optimizations.  I have not researched this issue carefully, but
> it seems that several Guile bugs may be related to this problem.
>
> Perhaps we should simply add this compiler flag where its available, at
> least in the short term.  What do you think?

So, we added it, for GCC; cool.  I was wondering though whether we might
be able to get by with something more limited, at least on GCC.  Have
you looked at __attribute__((__may_alias__))?  It does seem like a good
idea to add it to SCM, as we frequently alias SCM and scm_t_bits values
at the very least.  Also adding it to struct scm_vm_frame would also fix
the vm frame issue.

Dunno.  WDYT?

Regards,

Andy
-- 
http://wingolog.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]