unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Mark H Weaver <mhw@netris.org>
Cc: ludo@gnu.org, guile-devel@gnu.org
Subject: Re: Should we compile Guile with -fno-strict-aliasing?
Date: Sun, 29 Jan 2012 22:02:48 +0100	[thread overview]
Message-ID: <87obtmxlvr.fsf@pobox.com> (raw)
In-Reply-To: <87hazhm0jm.fsf@netris.org> (Mark H. Weaver's message of "Fri, 27 Jan 2012 14:02:21 -0500")

Hi!

On Fri 27 Jan 2012 20:02, Mark H Weaver <mhw@netris.org> 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/



  parent reply	other threads:[~2012-01-29 21:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27 19:02 Should we compile Guile with -fno-strict-aliasing? Mark H Weaver
2012-01-27 21:02 ` Ludovic Courtès
2012-01-29 21:21   ` Ludovic Courtès
2012-01-29 21:02 ` Andy Wingo [this message]
2012-01-29 21:10   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87obtmxlvr.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).