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: Fri, 27 Jan 2012 22:02:11 +0100 Message-ID: <87y5sssvu4.fsf@gnu.org> References: <87hazhm0jm.fsf@netris.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1327698164 12799 80.91.229.12 (27 Jan 2012 21:02:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 Jan 2012 21:02:44 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jan 27 22:02:40 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RqswS-0005ZR-4m for guile-devel@m.gmane.org; Fri, 27 Jan 2012 22:02:40 +0100 Original-Received: from localhost ([::1]:36534 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqswR-00050c-L4 for guile-devel@m.gmane.org; Fri, 27 Jan 2012 16:02:39 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:44600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqswK-00050W-Fn for guile-devel@gnu.org; Fri, 27 Jan 2012 16:02:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqswI-0004NW-2u for guile-devel@gnu.org; Fri, 27 Jan 2012 16:02:32 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:38601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqswH-0004NL-Hh for guile-devel@gnu.org; Fri, 27 Jan 2012 16:02:30 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RqswG-0005SC-B8 for guile-devel@gnu.org; Fri, 27 Jan 2012 22:02:28 +0100 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Jan 2012 22:02:28 +0100 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Jan 2012 22:02:28 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 230 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 =?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 User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:uDfXK8SO3CX+SAKfhgkWwuHK3fs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:13715 Archived-At: Hi Mark, Mark H Weaver skribis: > Perhaps we should simply add this compiler flag where its available, at > least in the short term. What do you think? I’ve been thinking about that too, because on some platforms GCC emits may-break-strict-aliasing-rules warnings, notably on x86_64-freebsd8.2 with GCC 4.2.1: --8<---------------cut here---------------start------------->8--- vm.c: In function 'vm_reinstate_partial_continuation': vm.c:281: warning: dereferencing type-punned pointer will break strict-aliasing rules In file included from vm-engine.c:127, from vm.c:467: vm-i-system.c: In function 'vm_regular_engine': vm-i-system.c:49: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:52: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:53: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:79: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:212: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:225: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:418: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:430: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:445: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:465: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:487: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:528: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:537: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:546: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:556: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:566: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:575: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:923: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:994: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1043: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1073: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1089: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1121: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1131: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1195: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1218: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1241: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1281: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1332: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1427: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1446: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1457: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1470: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1472: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1480: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1513: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1548: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1574: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1600: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1607: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1619: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1627: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1641: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1679: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1704: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1726: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1751: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1783: warning: dereferencing type-punned pointer will break strict-aliasing rules In file included from vm-engine.c:128, from vm.c:467: vm-i-scheme.c:192: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:203: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:599: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:624: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:626: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:629: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:692: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:809: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:859: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:861: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:863: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:865: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:867: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:869: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:871: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:873: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1016: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1016: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1018: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1018: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1020: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1020: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1022: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1022: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1024: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1024: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1026: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1026: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1028: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1028: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1030: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1030: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1119: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1121: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1123: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1125: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1128: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1134: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1139: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1141: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1143: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1145: warning: dereferencing type-punned pointer will break strict-aliasing rules In file included from vm-engine.c:129, from vm.c:467: vm-i-loader.c:65: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-loader.c:87: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-loader.c:99: warning: dereferencing type-punned pointer will break strict-aliasing rules In file included from vm-engine.c:127, from vm.c:475: vm-i-system.c: In function 'vm_debug_engine': vm-i-system.c:49: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:52: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:53: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:79: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:212: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:225: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:418: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:430: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:445: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:465: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:487: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:528: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:537: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:546: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:556: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:566: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:575: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:923: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:994: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1043: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1073: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1089: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1121: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1131: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1195: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1218: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1241: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1281: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1325: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1332: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1367: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1427: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1446: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1457: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1470: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1472: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1480: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1513: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1548: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1574: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1600: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1607: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1619: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1627: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1641: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1679: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1704: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1726: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1751: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-system.c:1783: warning: dereferencing type-punned pointer will break strict-aliasing rules In file included from vm-engine.c:128, from vm.c:475: vm-i-scheme.c:192: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:203: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:599: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:624: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:626: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:629: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:692: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:809: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:859: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:861: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:863: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:865: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:867: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:869: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:871: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:873: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1016: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1016: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1018: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1018: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1020: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1020: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1022: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1022: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1024: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1024: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1026: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1026: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1028: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1028: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1030: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1030: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1119: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1121: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1123: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1125: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1128: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1134: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1139: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1141: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1143: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-scheme.c:1145: warning: dereferencing type-punned pointer will break strict-aliasing rules In file included from vm-engine.c:129, from vm.c:475: vm-i-loader.c:65: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-loader.c:87: warning: dereferencing type-punned pointer will break strict-aliasing rules vm-i-loader.c:99: warning: dereferencing type-punned pointer will break strict-aliasing rules --8<---------------cut here---------------end--------------->8--- I’ve just tried on this platform and it seems to fix the threading issues we were observing (though I won’t claim victory until Hydra reproduces the success several times in a row ;-)). It may well be that my recent COMPILER_BARRIER hack can just go away with this. I just committed the change. Thank you! Ludo’.