From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: Should we compile Guile with -fno-strict-aliasing? Date: Sun, 29 Jan 2012 22:10:40 +0100 Message-ID: <87zkd6nrjj.fsf@gnu.org> References: <87hazhm0jm.fsf@netris.org> <87obtmxlvr.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1327871457 12542 80.91.229.3 (29 Jan 2012 21:10:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 29 Jan 2012 21:10:57 +0000 (UTC) Cc: Mark H Weaver , guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Jan 29 22:10:56 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rrc1T-00014l-Ch for guile-devel@m.gmane.org; Sun, 29 Jan 2012 22:10:51 +0100 Original-Received: from localhost ([::1]:46381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrc1S-0008ID-Jf for guile-devel@m.gmane.org; Sun, 29 Jan 2012 16:10:50 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrc1P-0008I7-UQ for guile-devel@gnu.org; Sun, 29 Jan 2012 16:10:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rrc1O-0005qP-Va for guile-devel@gnu.org; Sun, 29 Jan 2012 16:10:47 -0500 Original-Received: from mail1-relais-roc.national.inria.fr ([192.134.164.82]:57961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrc1O-0005q7-PV for guile-devel@gnu.org; Sun, 29 Jan 2012 16:10:46 -0500 X-IronPort-AV: E=Sophos;i="4.71,588,1320620400"; d="scan'208";a="141944368" Original-Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 29 Jan 2012 22:10:44 +0100 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 10 =?iso-8859-1?Q?Pluvi=F4se?= an 220 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87obtmxlvr.fsf@pobox.com> (Andy Wingo's message of "Sun, 29 Jan 2012 22:02:48 +0100") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.134.164.82 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13733 Archived-At: Hi! Andy Wingo skribis: > On Fri 27 Jan 2012 20:02, Mark H Weaver 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=E2=80=99d say =E2=80=9Cmay=E2=80=9D, or =E2=80=9Cmight=E2=80=9D, rather t= han =E2=80=9Cwould=E2=80=9D. ;-) Thanks, Ludo=E2=80=99.