From: Momchil Velikov <velco@fadata.bg>
To: Alan Modra <amodra@bigpond.net.au>
Cc: gcc@gcc.gnu.org
Subject: Re: Undefined behavior in 950605-1.c
Date: Thu, 25 Jul 2002 10:56:00 -0000 [thread overview]
Message-ID: <873cu83skp.fsf@fadata.bg> (raw)
In-Reply-To: <20020725102412.GV26054@bubble.sa.bigpond.net.au>
>>>>> "Alan" == Alan Modra <amodra@bigpond.net.au> 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
next prev parent reply other threads:[~2002-07-25 12:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-25 7:08 Momchil Velikov
2002-07-25 8:54 ` Andreas Schwab
2002-07-25 9:04 ` Momchil Velikov
[not found] ` <20020725102412.GV26054@bubble.sa.bigpond.net.au>
2002-07-25 10:56 ` Momchil Velikov [this message]
2002-07-25 11:24 ` Andreas Schwab
2002-07-25 13:25 ` Richard Henderson
2002-07-26 14:47 ` Richard Earnshaw
2002-07-28 0:08 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873cu83skp.fsf@fadata.bg \
--to=velco@fadata.bg \
--cc=amodra@bigpond.net.au \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).