From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.lisp.guile.devel Subject: aliasing (was: guile loses on NetBSD/sparc64 1.6.2 with gcc 3.3.2) Date: Fri, 27 Feb 2004 13:38:41 -0500 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <878yiqkbjp.fsf@raven.defaultvalue.org> <87ekshmxem.fsf@raven.defaultvalue.org> <87znb45vxx.fsf@raven.defaultvalue.org> <87vfls2yp8.fsf@raven.defaultvalue.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1077907238 13076 80.91.224.253 (27 Feb 2004 18:40:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 27 Feb 2004 18:40:38 +0000 (UTC) Cc: guile-devel@gnu.org, Greg Troxel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Feb 27 19:40:28 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AwmuR-0001GY-00 for ; Fri, 27 Feb 2004 19:40:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AwmtX-00068H-H8 for guile-devel@m.gmane.org; Fri, 27 Feb 2004 13:39:31 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AwmtN-00066K-1T for guile-devel@gnu.org; Fri, 27 Feb 2004 13:39:21 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1Awmsq-0005pU-AW for guile-devel@gnu.org; Fri, 27 Feb 2004 13:39:20 -0500 Original-Received: from [129.22.104.47] (helo=mirapoint2.tis.cwru.edu) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Awmsq-0005pQ-2U for guile-devel@gnu.org; Fri, 27 Feb 2004 13:38:48 -0500 Original-Received: from multivac.cwru.edu (multivac.ITS.CWRU.Edu [129.22.114.26]) by mirapoint2.tis.cwru.edu (MOS 3.4.3-CR) with SMTP id ALT14836; Fri, 27 Feb 2004 13:38:43 -0500 (EST) Original-Received: (qmail 27663 invoked by uid 500); 27 Feb 2004 18:39:04 -0000 Original-To: Rob Browning In-Reply-To: <87vfls2yp8.fsf@raven.defaultvalue.org> (Rob Browning's message of "Fri, 27 Feb 2004 11:56:35 -0600") Mail-Copies-To: nobody Mail-Followup-To: Rob Browning , Greg Troxel , guile-devel@gnu.org Original-Lines: 22 User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.lisp.guile.devel:3460 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3460 Rob Browning wrote: > Also, I think you may be able to use a union safely as an > alternative with gcc, but from what I recall, that's non-standard. I don't think it's generally possible for gcc to handle that case specially. Consider: void foo(int* i, float* f) { *i=42; *f=3.14159; } void bar(void) { union { int i; float f; } u; foo(&u.i, &u.f); /* What's in u.f now? */ } These functions could appear in different source files. So when foo is being compiled, the compiler can't know whether i and f point to overlapping members of the same union. It assumes they don't overlap because of their types, and reorders the writes if it likes. paul _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel