From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17936 invoked by alias); 25 Jul 2002 12:38:44 -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 17143 invoked from network); 25 Jul 2002 12:38:05 -0000 Received: from unknown (HELO fadata.bg) (80.72.64.67) by sources.redhat.com with SMTP; 25 Jul 2002 12:38:05 -0000 Received: (qmail 1614 invoked by uid 1000); 25 Jul 2002 12:38:01 -0000 To: Alan Modra Cc: gcc@gcc.gnu.org Subject: Re: Undefined behavior in 950605-1.c References: <8765z4e391.fsf@fadata.bg> <87n0sgi154.fsf@fadata.bg> <20020725102412.GV26054@bubble.sa.bigpond.net.au> X-No-CC: Reply to lists, not to me. From: Momchil Velikov Date: Thu, 25 Jul 2002 10:56:00 -0000 In-Reply-To: <20020725102412.GV26054@bubble.sa.bigpond.net.au> Message-ID: <873cu83skp.fsf@fadata.bg> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-07/txt/msg01211.txt.bz2 >>>>> "Alan" == Alan Modra writes: Alan> On Thu, Jul 25, 2002 at 12:53:59PM +0300, Momchil Velikov wrote: >> representable if the promoted type of the parametar is unsigned. Alan> Ah, but what is the promoted type of "unsigned char"? int! ISO/IEC 9899:1999 6.5.2.2 [#6] " ... the other promoted type is the corresponding unsigned integer type, ..." IMHO, that means that it is legal for the promoted type of ``unsigned char'' to be ``unsigned int''. Isn't that the case with architectures with a definition of PROMOTE_MODE, which does not change UNSIGNEDP or sets it to 1, e.g, ARM, PPC, V850 ? Indeed it contradicts with 6.3.1.1 [#2]: "If an int can represent all values of the original type, the value is converted to an int; otherwise, it is converted to an unsigned int. These are called the integer promotions." ~velco