[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should we compile Guile with -fno-strict-aliasing?
From: |
Ludovic Courtès |
Subject: |
Re: Should we compile Guile with -fno-strict-aliasing? |
Date: |
Sun, 29 Jan 2012 22:10:40 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) |
Hi!
Andy Wingo <address@hidden> skribis:
> 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.
Yes, why not, but post-2.0.4 maybe?
> Also adding it to struct scm_vm_frame would also fix the vm frame
> issue.
I’d say “may”, or “might”, rather than “would”. ;-)
Thanks,
Ludo’.