From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25712 invoked by alias); 13 Oct 2004 15:24:10 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 25701 invoked from network); 13 Oct 2004 15:24:08 -0000 Received: from unknown (HELO NUTMEG.CAM.ARTIMI.COM) (217.40.111.177) by sourceware.org with SMTP; 13 Oct 2004 15:24:08 -0000 Received: from mace ([192.168.1.25]) by NUTMEG.CAM.ARTIMI.COM with Microsoft SMTPSVC(6.0.3790.0); Wed, 13 Oct 2004 16:23:37 +0100 From: "Dave Korn" To: "'Joseph S. Myers'" Cc: "'Andreas Schwab'" , "'Gabriel Dos Reis'" , "'Phil Edwards'" , "'Zack Weinberg'" , "'Geoffrey Keating'" , "'Ranjit Mathew'" , Subject: RE: Compiling GCC With a C++ Compiler (g++) Date: Wed, 13 Oct 2004 17:01:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: Message-ID: X-OriginalArrivalTime: 13 Oct 2004 15:23:38.0282 (UTC) FILETIME=[9CF540A0:01C4B138] X-SW-Source: 2004-10/txt/msg00518.txt.bz2 > -----Original Message----- > From: Joseph S. Myers > Sent: 13 October 2004 15:10 > Without "restrict" the only relevant undefined behavior is if > the object > is *defined* with qualified type (6.7.3#5). This can apply > with static or > automatic storage duration declarations such as > > struct { const char x } y = { z }; > > but cannot apply to an object of allocated storage duration. Huh? Are you saying that in: typedef struct { const char x } AA; AA *py1, py2; AA y1 = { z }; py1 = malloc (sizeof *py2); py2 = &y1; it is valid to say *(char *)(&py1->x) = '?'; but not valid to say *(char *)(&py2->x) = '?'; ? I think I may have reached the point at which I am starting to boggle..... cheers, DaveK -- Can't think of a witty .sigline today....