Article View: comp.std.c
Article #3887Re: comments on SBEIR (extended integer) proposal
From: Thad Smith
Date: Tue, 29 Aug 1995 02:18
Date: Tue, 29 Aug 1995 02:18
40 lines
2098 bytes
2098 bytes
In article <41si28$t25@newsbf02.news.aol.com>,
ffarance@aol.com (FFarance) wrote:
>> From: thads@csn.net (Thad Smith)
>> Integral Promotions
>> -------------------
>> In Standard C, types char, short int, or int bit-field, or signed
>> or unsigned varieties undergo integral promotion to int or
>> unsigned int. The SBEIR proposal discusses this briefly in section
>> 2.2.2, but doesn't specify whether the promotion is to unoptimized
>> int, fast int, or small int. Is it always unoptimized int or does
>> the specified optimization of the original type get inherited?
>> The proposal also does not add any words to the standard section
>> on integral promotions to deal with extended ints.
> The current SBEIR proposal drags the performance attributes into
> the expressions. At the Copenhagen meeting, we agreed to remove
> performance attributes of temporaries -- similar to "const" and
> "volatile" not being dragged into temporaries.
Integral promotion determines the actual size of the promoted
value. In Standard C this is int. The promoted size is
used for the argument of an unprototyped parameter. For example:
fast short int x = 5;
printf ("%d", x);
Except for the new keyword "fast", this is valid code in C. Could an
SBEIR implementation make sizeof(fast short int) > sizeof(int)? If
so, the code would not work and the user would need to use the "?"
modifier and EIR_BIT macro to get a valid statement. When can we
depend on utilizing an integral promotion fixing the operand at the
default integral size and when do we need to process it as variable in
size?
> Thanx for your comments.
You're welcome.
Thad
Technical Details
Message-ID:
<6IjQwQ9yt93N084yn@csn.net>Path:
arc1-ca.pugleaf.net!teal.csn.net!not-for-mailReferences:
<+YVQwQ9ytJ7f084yn@csn.net> <41si28$t25@newsbf02.news.aol.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!teal.csn.net!not-for-mail From: thads@csn.net (Thad Smith) Newsgroups: comp.std.c Subject: Re: comments on SBEIR (extended integer) proposal Date: 28 Aug 1995 20:18:50 -0600 Organization: T3 Systems Message-ID: <6IjQwQ9yt93N084yn@csn.net> References: <+YVQwQ9ytJ7f084yn@csn.net> <41si28$t25@newsbf02.news.aol.com> Reply-To: ThadSmith@acm.org NNTP-Posting-Host: 199.117.27.22