Email List: Xaustin-group-lX
[All Lists]

Re: Using terms from ISO C (was: Minutes from todays teleconference)

To: Don Cragun <yyy@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Using terms from ISO C (was: Minutes from todays teleconference)
From: "Clive D.W. Feather" <yyyyy@xxxxxxxxx>
Date: Sat, 24 Mar 2001 23:56:06 +0000
Cc: yyyyyyyyyyyyyy@xxxxxxxxxxxxx
References: <200103221746.JAA05696@spartan.eng.sun.com>
Don Cragun said:
>       Note that the C Standard is listed as a normative reference
> (XBD Draft 5, P5, L162-163.  Therefore, a C term used in this standard
> is not an "undefined term".  In the few places where we modify C terms,
> the differences are clearly specified by notes in the definitions of
> those terms.  (For an example, see XBD Draft 5, P52, L1852-1860's
> definition of the term character.)

If that's so, then most of my issue goes away.

>       One big problem I had with the suggested change in the Notes to
> Reviewers on P332, L11660-11667 is that it modifies text taken directly
> from section 7.18.4 of the C Standard and changes it in a way that
> invalidates text that appears in XBD draft 5, P332, L11677-11678 and C
> Standard section 7.18.4.1.
>       Specifically, the C Standard says:
>               For example, if uint_least64_t is a name for the type
>               unsigned long long int, then UTIN64_C(0x123) might
>               expand to the integer constant 0x123ULL.
> The text you requested that we use as a replacement for the text from
> the C Standard would not allow 0x123ULL; only 0x123.  Your aardvark
> input indicated that the pending ISO C defect report uses "integer
> constant expression" instead of "integer constant", but it still shows
> the "ULL".
>       Therefore, if there is a bug in the use of integer constant (or
> integer constant expression) along with decimal constant, octal
> constant, and hexadecimal constant; it has been copied here from the C
> Standard.  If you still believe that we need to change this in AGRd6,
> please verify that the wording in the C Standard is indeed fixed by
> TC1.

I think you've misunderstood the situation.

The *expansion* of the macro is an integer constant in C99, or an integer
constant expression once TC1 is applied. The former includes suffixes, so
0x123ULL would be a valid expansion of the macro.

[The change was designed around macros like UINT8_C. Unless your
implementation has a magic suffix, there's no way to implement it (it must
have the type int_least8_t, and there's no suffix for that in C99.]

What I was discussing was the *argument* of the macro. The text that's
currently on lines 11668-9 correctly paraphrases 7.18.4#2 of C99. My
concern was to do with undefined terms; those terms are defined in
6.4.4.1#1 and don't have suffixes.

Ah, I've just looked again and seen the problem. Line 11664 should begin
with "argument", not "constant". No wonder we've been at loggerheads !
I'm sorry I've missed that up to now. If you believe that the C99
definition of octal constant etc. carries through, then no normative
change is needed. Putting my text somewhere in non-normative text wouldn't
hurt, though.

-- 
Clive D.W. Feather  | Work:  <yyyyy@xxxxxxxxx>   | Tel:  +44 20 8371 1138
Internet Expert     | Home:  <yyyyy@xxxxxxxxxx>  | Fax:  +44 20 8371 1037
Demon Internet      | WWW: http://www.davros.org | DFax: +44 20 8371 4037
Thus plc            |                            | Mobile: +44 7973 377646 

<Prev in Thread] Current Thread [Next in Thread>