From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17929 invoked by alias); 15 Oct 2002 18:24:13 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 17922 invoked from network); 15 Oct 2002 18:24:13 -0000 Received: from unknown (HELO lars.boxcarmedia.com) (209.213.0.162) by sources.redhat.com with SMTP; 15 Oct 2002 18:24:13 -0000 Received: from josh (unknown [209.213.12.200]) by lars.boxcarmedia.com (Postfix) with SMTP id 3DB54122DD4; Tue, 15 Oct 2002 14:24:12 -0400 (EDT) Message-ID: <001801c27478$0ee5e480$c800a8c0@pdc1.boxcarmedia.com> From: "Joshua Nye" To: "Florian Weimer" Cc: "Steve Dondley" , References: <000d01c272d5$85368b20$0100a8c0@windows9q3yn19> <87adlidm9l.fsf@deneb.enyo.de> Subject: Re: Avoiding "assignment from incompatible pointer type" warning Date: Tue, 15 Oct 2002 11:24:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-SW-Source: 2002-10/txt/msg00195.txt.bz2 > > int *p; > > float g = 3.141592653589793238; > > p = (int *)&g; > > Is this code legal? I doubt it. > What do you consider legal and why wouldn't it be?