From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24630 invoked by alias); 2 Aug 2005 22:15:20 -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 24609 invoked by uid 22791); 2 Aug 2005 22:15:15 -0000 Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.202) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 02 Aug 2005 22:15:15 +0000 Received: by rproxy.gmail.com with SMTP id a36so2158923rnf for ; Tue, 02 Aug 2005 15:13:10 -0700 (PDT) Received: by 10.11.99.3 with SMTP id w3mr89cwb; Tue, 02 Aug 2005 15:07:00 -0700 (PDT) Received: by 10.11.99.15 with HTTP; Tue, 2 Aug 2005 15:07:00 -0700 (PDT) Message-ID: <7f45d9390508021507322c81a2@mail.gmail.com> Date: Tue, 02 Aug 2005 22:15:00 -0000 From: Shaun Jackman Reply-To: Shaun Jackman To: Joe Buck Subject: Re: memcpy to an unaligned address Cc: Mike Stump , Andrew Pinski , Dave Korn , Paul Koning , gcc@sources.redhat.com In-Reply-To: <20050802211112.GB30893@synopsys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200508022037.j72Kbr4T012558@earth.phy.uc.edu> <33EADFBB-0C16-4FD9-BC0D-E681C0A61C46@apple.com> <20050802211112.GB30893@synopsys.com> X-SW-Source: 2005-08/txt/msg00093.txt.bz2 On 8/2/05, Joe Buck wrote: > I suppose we could make & on an unaligned project return a void*. That > isn't really right, but it would at least prevent the cases that we know > don't work from compiling. That sounds like a dangerous idea only because I'd expect... int *p =3D &packed_struct.unaligned_member; ... to fail if unaligned_member is not an int, but if the & operator returns a void*, it would suddenly become very permissive. Cheers, Shaun