From owner-freebsd-current Mon Nov 11 14:39:33 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8345837B401 for ; Mon, 11 Nov 2002 14:39:32 -0800 (PST) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 30B8343E3B for ; Mon, 11 Nov 2002 14:39:31 -0800 (PST) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 11 Nov 2002 22:39:25 +0000 (GMT) Date: Mon, 11 Nov 2002 22:39:24 +0000 From: David Malone To: Harti Brandt Cc: Andrew Gallatin , FreeBSD-current@FreeBSD.ORG Subject: Re: gcc 3.2.1 optimization bug ? Message-ID: <20021111223924.GA30568@walton.maths.tcd.ie> References: <15823.48873.236346.943980@grasshopper.cs.duke.edu> <20021111163918.Y13339-100000@beagle.fokus.gmd.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021111163918.Y13339-100000@beagle.fokus.gmd.de> User-Agent: Mutt/1.3.25i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Nov 11, 2002 at 04:52:22PM +0100, Harti Brandt wrote: AG>But does using a union make it safe? > Well, I just had a long discussion with a collegue about the topic. The > main problem is in the ISO-C standard, section 6.7 point 4 which states: > > All declarations in the same scope that refer to the same object or > function shall specify compatible types. I think Section 6.5 paragraph 7 allows access through unions. There is a footnote saying that the list given (which includes access through the same type, qualified versions of the same type, aggregates and unions containign that type and character types) is intended for determining aliasing rules. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message