From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 0D2BB2F3F1 for ; Tue, 26 Sep 2000 14:01:58 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.8.7/8.8.7) id OAA29693 for axp-list@listman.redhat.com; Tue, 26 Sep 2000 14:01:57 -0400 Received: from ellpspace.math.ualberta.ca (michal@ellpspace.math.ualberta.ca [129.128.88.19]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id OAA29689 for ; Tue, 26 Sep 2000 14:01:56 -0400 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.9.3/8.9.3) id MAA12087 for axp-list@redhat.com; Tue, 26 Sep 2000 12:01:46 -0600 From: Michal Jaegermann Message-Id: <200009261801.MAA12087@ellpspace.math.ualberta.ca> Subject: Re: Weird Compaq CCC / GCC interaction ? To: axp-list@redhat.com Date: Tue, 26 Sep 2000 12:01:45 -0600 (MDT) In-Reply-To: from "Larry Sendlosky" at Sep 26, 2000 01:25:47 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors Larry Sendlosky wrote: > > > I haven't seen any of this thread, but the quoted spec is correct and > makes sense. Given the example below > > MAGIC is an unsigned int (32bits) with value 0xc00fc00f. The compiler > should generate 0x00000000c00fc00f for the register value. This is > "sign extending" an unsigned int (there is no sign bit or it's > "inferred" to be zero). That was really the question. The standard which we are talking about seems to imply that a return value from an unsigned int function should be 0xffffffffc00fc00f and not 0x00000000c00fc00f although you will notice that only after a cast to long. gcc, save the latest stuff, does what you describe above and this is non-conforming, if I understand correctly what was said here. I was curious about further implications. Michal