Re: is order urgent doubt



Flash Gordon wrote:
jacob navia wrote, On 03/06/08 07:21:
new to c wrote:

<snip>

Code print

sizeof(long int): 4
sizeof(int long): 4
sizeof(double int): 4
sizeof(int double): 8
sizeof(long long int): 8
sizeof(long int long): 4

<snip>

Jacob, in addition to Keith's questions did you notice that the above is wrong? As "long int long" is the same as "long long" the above should be 8.


6.7.2 Type specifiers
Syntax
1 type-specifier:
void char short int long float double signed unsigned _Bool _Complex _Imaginary struct-or-union-specifier enum-specifier typedef-name

Constraints
2 At least one type specifier shall be given in the declaration specifiers in each declaration, and in the specifier-qualifier list in each struct declaration and type name. Each list of type specifiers shall be one of the following sets (delimited by commas, when there is
more than one set on a line); the type specifiers may occur in any order, possibly
intermixed with the other declaration specifiers.
— void
— char
— signed char
— unsigned char
— short, signed short, short int, or signed short int
— unsigned short, or unsigned short int
— int, signed, or signed int
— unsigned, or unsigned int
— long, signed long, long int, or signed long int
— unsigned long, or unsigned long int
— long long, signed long long, long long int, or
signed long long int
— unsigned long long, or unsigned long long int
— float
— double
— long double
— _Bool
— float _Complex
— double _Complex
— long double _Complex
— float _Imaginary
— double _Imaginary
— long double _Imaginary
— struct or union specifier
— enum specifier
— typedef name

OK, then , I see:
— long long, signed long long, long long int, or signed long long int
— unsigned long long, or unsigned long long int

as legal declarations for long long variants.

long int long is a double declaration:
long int, and then long.

<snip>

Maybe this will clarify what lcc-win is doing.

Those warnings made it clearer in my opinion, but I agree with Keith's comments.

??? I do not see any message from Keith in this thread.
Could you clarify?

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
.



Relevant Pages

  • Re: Compound type name is allowed in a functional notation cast?
    ... int zero ... type, creates an rvalue of the specified type, which is ... cv-qualifiers are ignored when determining the type of the resulting ... Perhaps somebody at Microsoft misread the table 7 of the Standard and thought that on the left it listed "simple type specifiers", whereas in fact it lists "valid combinations" of them... ...
    (microsoft.public.vc.language)
  • Re: Macro for supplying memset with an unsigned char
    ... At least one type specifier shall be given in the declaration ... Each list of type specifiers ... more than one set on a line); the type specifiers may occur in any ... short, signed short, short int, or signed short int ...
    (comp.lang.c)
  • Re: What is the right interpretation?
    ... At least one type specifier shall be given in the declaration specifiers in each declaration, ... type specifiers shall be one of the following sets (delimited by commas, ... short, signed short, short int, or signed short int ...
    (comp.std.c)
  • Re: type names
    ... "At least one type specifier shall be given in the declaration specifiers ... more than one set on a line); the type specifiers may occur in any order, ... each set itself lists the specifiers in a certain order, ... short, signed short, short int, or signed short int ...
    (comp.std.c)
  • Re: new order doubt
    ... similar to type specifier combinations. ... The C specifiers can be handled similarly. ... switch (typespec) { ... // signed int ...
    (comp.lang.c)