From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bruce Korb Newsgroups: gmane.lisp.guile.devel Subject: Re: Everyone working on the C side might want to read this article... Date: Mon, 28 Apr 2003 14:02:36 -0700 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <3EAD96EC.57F41CA7@veritas.com> References: <873ckgevxl.fsf@raven.i.defaultvalue.org> <87llxul55x.fsf@raven.i.defaultvalue.org> Reply-To: bkorb@veritas.com NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1051564064 12320 80.91.224.249 (28 Apr 2003 21:07:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 28 Apr 2003 21:07:44 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Apr 28 23:07:43 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19AFqg-0003CO-00 for ; Mon, 28 Apr 2003 23:07:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19AFok-0005rU-04 for guile-devel@m.gmane.org; Mon, 28 Apr 2003 17:05:42 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19AFmO-000546-00 for guile-devel@gnu.org; Mon, 28 Apr 2003 17:03:16 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19AFly-0004bc-00 for guile-devel@gnu.org; Mon, 28 Apr 2003 17:02:53 -0400 Original-Received: from bay-bridge.veritas.com ([143.127.3.10] helo=mtvmime01.veritas.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19AFlq-0004XS-00 for guile-devel@gnu.org; Mon, 28 Apr 2003 17:02:43 -0400 Original-Received: from megami (unverified) by mtvmime01.veritas.com ; Mon, 28 Apr 2003 14:05:21 -0700 Original-Received: from veritas.com(ellen.veritas.com[10.180.88.137]) (2135 bytes) by megami via sendmail with P:esmtp/R:smart_host/T:smtp (sender: ) id for ; Mon, 28 Apr 2003 14:02:41 -0700 (PDT) (Smail-3.2.0.101 1997-Dec-17 #15 built 2001-Aug-30) X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: en Original-To: Rob Browning X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2234 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2234 Rob Browning wrote: > > Rob Browning writes: > > > The following article explains gcc changes that may be behind at least > > some of our recent set of bugs: > > > > http://www.ddj.com/documents/s=880/ddj0010d/0010d.htm > > So does anyone have thoughts about how we should approach this issue? > How common do we think these type aliasing problems might be in our > code, and if we do have problems, can we just fix each offending bit > of code with temp assignments or other "disambiguating" statements, or > is there some higher level way we might be able to address the issue > (i.e. could a union help here, something else?). The default optimization is sufficient for many of the aliasing problems. If you compile with the GCC 3.3 branch -Wall will trigger some extra aliasing-related warnings. Examine the warnings carefully. Remember that just because it didn't warn doesn't mean there isn't a problem. However, the warnings do actually cover most of the common ways aliasing breaks code. WRT how to fix, there are several solutions: 1. you can go the way of the kernel and -fno-strict-aliasing 2. you can unionize the pointer types 3. you can use the "I can point to anything" pointer types viz., char* and void*. A sure fire test, once you've discovered a problem, is to try rebuilding with -fno-strict-aliasing and see if the problem goes away. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel