long long int 
Author Message
 long long int

    ok, guys, I have here a copy of the standard (ISO/IEC 9899, though
it is labeled Committee Draft -- August 3, 1998; don't ask me where I
got it from...)

    it states, section 6.7.2 type specifiers, that "long long int" is a
type specifier.

    so what should I think of my compiler that chokes on the following
bit of code :

typedef struct ms_tag
{
 int a;
 long int b;
 long long int c; <-- chokes here
 int d;

Quote:
} ms;

int main(void)
{
 ms s, *s_ptr;

 s.a = 0x12345678;
 s.b = 0xbeeff00d;
 s.c = 0xcafebabe;
 s.d = 0xdeadbeef;

 s_ptr = &s;

Quote:
}

with the following error message :
'long' followed by 'long' is illegal

    I mean, ain't compilers supposed to respect the standard ?

    Thx for your comments

    Bertrand



Mon, 27 Oct 2003 08:27:26 GMT  
 long long int


Quote:
>     ok, guys, I have here a copy of the standard (ISO/IEC 9899, though
> it is labeled Committee Draft -- August 3, 1998; don't ask me where I
> got it from...)

>     it states, section 6.7.2 type specifiers, that "long long int" is a
> type specifier.

>     so what should I think of my compiler that chokes on the following
> bit of code :

<snipped code using long long int>

Quote:
> with the following error message :
> 'long' followed by 'long' is illegal

>     I mean, ain't compilers supposed to respect the standard ?

Yes, but most compilers haven't been updated entirely to support all the
features of the new (C99) standard.

Mark Duell



Mon, 27 Oct 2003 08:56:42 GMT  
 long long int
On Thu, 10 May 2001 00:27:26 GMT, Bertrand Mollinier Toublet

Quote:
>     ok, guys, I have here a copy of the standard (ISO/IEC 9899, though
> it is labeled Committee Draft -- August 3, 1998; don't ask me where I
> got it from...)

>     it states, section 6.7.2 type specifiers, that "long long int" is a
> type specifier.

>     so what should I think of my compiler that chokes on the following
> bit of code :

> typedef struct ms_tag
> {
>  int a;
>  long int b;
>  long long int c; <-- chokes here
>  int d;
> } ms;

> int main(void)
> {
>  ms s, *s_ptr;

>  s.a = 0x12345678;
>  s.b = 0xbeeff00d;
>  s.c = 0xcafebabe;
>  s.d = 0xdeadbeef;

>  s_ptr = &s;
> }

> with the following error message :
> 'long' followed by 'long' is illegal

>     I mean, ain't compilers supposed to respect the standard ?

>     Thx for your comments

>     Bertrand

Compilers that claim standard conformance are supposed to conform to
the standard that they claim conformance to, generally the one in
effect when they were "frozen" in development.

What compiler brand and version are you using?  When was it released?
The type long long was formerly an extension on some compilers.  It
was added to the recent update to the C language standard that was
adopted by ISO in October 1999 and ANSI in May 2000.

The first C compiler I used did not accept prototypes, did not have
the void, const, and volatile keywords, did not have the long double
data type, and did not include quite a few of the standard library
functions.  That might have had something to do with it being
developed more than a decade before the first language standard was
adopted by ANSI in 1989.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq



Mon, 27 Oct 2003 11:25:09 GMT  
 long long int

Quote:



>>     ok, guys, I have here a copy of the standard (ISO/IEC 9899, though
>> it is labeled Committee Draft -- August 3, 1998; don't ask me where I
>> got it from...)

>>     it states, section 6.7.2 type specifiers, that "long long int" is a
>> type specifier.

>>     so what should I think of my compiler that chokes on the following
>> bit of code :
><snipped code using long long int>
>> with the following error message :
>> 'long' followed by 'long' is illegal

>>     I mean, ain't compilers supposed to respect the standard ?

>Yes, but most compilers haven't been updated entirely to support all the
>features of the new (C99) standard.

And even those that do support it have to be told to be in C99 mode.
--
Greg Comeau                 Comeau C/C++ 4.2.45.2
ONLINE COMPILER ==>         http://www.comeaucomputing.com/tryitout
NEW: Try out libcomo!       NEW: Try out our C99 mode!



Wed, 29 Oct 2003 00:05:29 GMT  
 long long int

Quote:




>>>     ok, guys, I have here a copy of the standard (ISO/IEC 9899, though
>>> it is labeled Committee Draft -- August 3, 1998; don't ask me where I
>>> got it from...)

>>>     it states, section 6.7.2 type specifiers, that "long long int" is a
>>> type specifier.

>>>     so what should I think of my compiler that chokes on the following
>>> bit of code :
>><snipped code using long long int>
>>> with the following error message :
>>> 'long' followed by 'long' is illegal

>>>     I mean, ain't compilers supposed to respect the standard ?

>>Yes, but most compilers haven't been updated entirely to support all the
>>features of the new (C99) standard.

>And even those that do support it have to be told to be in C99 mode.

They just don't have to be in C89 conforming mode.  long long may be the
only C99 feature they support when invoked in non-conforming mode.  C99
conformance is definitely not required for a compiler to support
long long.

Dan
--
Dan Pop
CERN, IT Division

Mail:  CERN - IT, Bat. 31 1-014, CH-1211 Geneve 23, Switzerland



Wed, 29 Oct 2003 02:58:45 GMT  
 long long int

Quote:






>>>>     ok, guys, I have here a copy of the standard (ISO/IEC 9899, though
>>>> it is labeled Committee Draft -- August 3, 1998; don't ask me where I
>>>> got it from...)

>>>>     it states, section 6.7.2 type specifiers, that "long long int" is a
>>>> type specifier.

>>>>     so what should I think of my compiler that chokes on the following
>>>> bit of code :
>>><snipped code using long long int>
>>>> with the following error message :
>>>> 'long' followed by 'long' is illegal

>>>>     I mean, ain't compilers supposed to respect the standard ?

>>>Yes, but most compilers haven't been updated entirely to support all the
>>>features of the new (C99) standard.

>>And even those that do support it have to be told to be in C99 mode.

>They just don't have to be in C89 conforming mode.  long long may be the
>only C99 feature they support when invoked in non-conforming mode.  C99
>conformance is definitely not required for a compiler to support
>long long.

You are entirely correct, but my comment was to the last statement,
about compilers.  That is to say: And even those that do support it
(C99) have to be told to be in C99 mode.  Indeed, some compilers
have supported long long for some time as an extension (Comeau
certainly has).
--
Greg Comeau                 Comeau C/C++ 4.2.45.2
ONLINE COMPILER ==>         http://www.comeaucomputing.com/tryitout
NEW: Try out libcomo!       NEW: Try out our C99 mode!



Wed, 29 Oct 2003 08:42:21 GMT  
 long long int
Groovy hepcat Bertrand Mollinier Toublet was jivin' on Thu, 10 May
2001 00:27:26 GMT in comp.lang.c.
long long int's a cool scene! Dig it!

Quote:
>    ok, guys, I have here a copy of the standard (ISO/IEC 9899, though
>it is labeled Committee Draft -- August 3, 1998; don't ask me where I
>got it from...)

  Then it is not the standard. It is a draft version of what was to
become the C99 standard. It's not even the most up to date version.
The one I have (n869.pdf) is labeled "Committee Draft January 18,
1999". Do a Web search for "n869.pdf" to find this.
--

Dig the even newer still, yet more improved, sig!

http://alphalink.com.au/~phaywood/
"Ain't I'm a dog?" - Ronny Self, Ain't I'm a Dog, written by G. Sherry & W. Walker.
I know it's not "technically correct" English; but since when was rock & roll "technically correct"?



Sun, 02 Nov 2003 08:29:21 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. char size (was long long long long long int)

2. typecasting int to long long int

3. long long int

4. long long int into octets (and back again)

5. unsigned long long int

6. long long int

7. Assigning and printing long long int's

8. long long int

9. long long long long integers

10. long int versus long

11. Help! INT longer than LONG

12. Handling very large integers without "long long int"

 

 
Powered by phpBB® Forum Software