很久很久 [英] long long

查看:66
本文介绍了很久很久的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


所有C99实现都应支持很长时间?如果是,那么它应该至少是64位吗?海湾合作委员会表示它支持很长时间,但

i得到了这个:

#include< stdio.h>

#include< limits。 h>


int main()

{

printf(" long long的最大值:%lld \ n) ;,LLONG_MAX);

printf(最长值:%ld \ n,LONG_MAX);


}

C:\c> \ ingw\bin\gcc -v

从/mingw/bin/../lib/gcc-lib/mingw32/3.3.1阅读规格/ specs

配置:

... / gcc / configure --with-gcc --with-gnu-ld --with-gnu-as --host =

mingw32 --target = mingw32 --prefix = / mingw --enable-threads --disable-nls --en

able

-languages = c,c ++,f77,objc,ada,java --disable-win32-registry --disable-shared

--e

nable-sjlj-例外--enable-libgcj --disable-java-awt --without-x --enabl

e-ja

va-gc = boehm --disable-libgcj -debug --enable-interpreter --enable-hash-synchr
oniz

ation

线程型号:win32

gcc版本3.3.1(mingw special 20030804-1)

C:\c> \ ingw\bin\gcc -std = c99 -pedantic-errors -O3 -Wall temp.c -o temp

temp.c:在函数`main''中:

temp.c:6:错误:`LLONG_MAX''未声明(在此函数中首次使用)

temp.c:6:错误:(每个未声明的标识符仅报告一次

temp.c:6:错误:对于它出现的每个函数。)


C:\c> ;

有什么想法吗?


问候,


Ioannis Vranos

Hi all,

Is long long supposed to be supported in all C99 implementations?If yes is
it supposed to be 64 bit at least? GCC says that it supports long long, but
i got this:
#include <stdio.h>
#include <limits.h>

int main()
{
printf("Maximum value for long long: %lld\n", LLONG_MAX);
printf("Maximum value for long: %ld\n", LONG_MAX);

}
C:\c>\mingw\bin\gcc -v
Reading specs from /mingw/bin/../lib/gcc-lib/mingw32/3.3.1/specs
Configured with:
.../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --en
able
-languages=c,c++,f77,objc,ada,java --disable-win32-registry --disable-shared
--e
nable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enabl
e-ja
va-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchr
oniz
ation
Thread model: win32
gcc version 3.3.1 (mingw special 20030804-1)
C:\c>\mingw\bin\gcc -std=c99 -pedantic-errors -O3 -Wall temp.c -o temp
temp.c: In function `main'':
temp.c:6: error: `LLONG_MAX'' undeclared (first use in this function)
temp.c:6: error: (Each undeclared identifier is reported only once
temp.c:6: error: for each function it appears in.)

C:\c>
Any ideas?


Regards,

Ioannis Vranos

推荐答案



" Ioannis Vranos" < iv*@guesswh.at.emails.ru>一个écritdansle message de

news:c5 ********** @ ulysses.noc.ntua.gr ...

"Ioannis Vranos" <iv*@guesswh.at.emails.ru> a écrit dans le message de
news:c5**********@ulysses.noc.ntua.gr...
大家好,




所有C99实现都应该支持很长时间吗?如果是的话
它应该至少是64位吗?海湾合作委员会表示,它支持多头,
,但我得到了这个:


是的。

#include< stdio.h>
#include< limits.h>

int main()


int main(无效)

{
printf(long long的最大值:%lld \ n,LLONG_MAX);
printf(long的最大值:%ld \ n,LONG_MAX);

}


你的程序看起来是关于C99的。


<>

线程模型:win32
gcc版本3.3.1(mingw special 20030804-1)

C:\c> \ ingw\bin\gcc -std = c99 -pedantic-errors -O3 - Wall temp.c -o temp
temp.c:在函数`main'':
temp.c:6:错误:`LLONG_MAX''未声明(首次使用此功能)
temp.c:6:错误:(每个未声明的标识符只报告一次
temp.c:6:错误:对于它出现的每个函数。)

C:\c>

任何想法?


我正确地编译了它gcc 3.3.1(cygwin)具有相同的选项,但

编译没有成功使用Dev-C ++ 4.9.8.0(使用mingw版本的gcc

3.2 )我得到了同样的错误。它似乎是mingw gcc

portage的错误。

我不知道它是否已被报道。您可以在 www.mingw.org <上找到更多

信息/ a>。

Regis


问候,

Ioannis Vranos
Hi all,
Hi,

Is long long supposed to be supported in all C99 implementations?If yes is
it supposed to be 64 bit at least? GCC says that it supports long long, but i got this:
Yes.

#include <stdio.h>
#include <limits.h>

int main()
int main(void)
{
printf("Maximum value for long long: %lld\n", LLONG_MAX);
printf("Maximum value for long: %ld\n", LONG_MAX);

}

Your program looks true regarding C99.

<>
Thread model: win32
gcc version 3.3.1 (mingw special 20030804-1)
C:\c>\mingw\bin\gcc -std=c99 -pedantic-errors -O3 -Wall temp.c -o temp
temp.c: In function `main'':
temp.c:6: error: `LLONG_MAX'' undeclared (first use in this function)
temp.c:6: error: (Each undeclared identifier is reported only once
temp.c:6: error: for each function it appears in.)

C:\c>
Any ideas?

I compiled it properly with gcc 3.3.1 (cygwin) with the same options but the
compilation did''nt succeed with Dev-C++ 4.9.8.0 (uses mingw version of gcc
3.2) and I got the same error. It appears it''s a bug of the mingw gcc
portage.
I don''t know if it has already been reported. You''ll maybe find much more
informations at www.mingw.org.
Regis


Regards,

Ioannis Vranos








"RégisTroadec" <重** @ wanadoo.fr>在消息中写道

news:c5 ********** @ news-reader2.wanadoo.fr ...
"Régis Troadec" <re**@wanadoo.fr> wrote in message
news:c5**********@news-reader2.wanadoo.fr...

我编译了它正确与gcc 3.3.1(cygwin)具有相同的选项但
编译没有成功使用Dev-C ++ 4.9.8.0(使用mingw版本的gcc
3.2)并且我得到了相同的错误。它似乎是mingw gcc
portage的一个bug。

I compiled it properly with gcc 3.3.1 (cygwin) with the same options but the compilation did''nt succeed with Dev-C++ 4.9.8.0 (uses mingw version of gcc
3.2) and I got the same error. It appears it''s a bug of the mingw gcc
portage.



你能否至少给我提供结果,以免留在

好​​奇心? :-)


Ioannis Vranos


Can you provide me with the results at least, so as to not remain with the
curiosity? :-)


Ioannis Vranos


Ioannis Vranos写道:
Ioannis Vranos wrote:
大家好,

所有C99实现都应该支持很长时间吗?如果是的话
它应该至少是64位吗?海湾合作委员会说它支持很长时间,但是我得到了这个:

#include< stdio.h>
#include< limits.h>

int main()
{/> printf(" long long的最大值:%lld \ n",LLONG_MAX);
printf(" long的最大值:% ld\ n,LONG_MAX);
gcc版本3.3.1(mingw special 20030804-1)
C:\c> \ ingw\bin\gcc -std = c99 -pedantic-errors -O3 -Wall temp.c -o temp
temp.c:在函数`main'':
temp.c:6:错误:`LLONG_MAX''未声明(在此函数中首次使用)
temp.c: 6:错误:(每个未声明的标识符只报告一次
temp.c:6:错误:对于它出现的每个函数。)
Hi all,

Is long long supposed to be supported in all C99 implementations?If yes is
it supposed to be 64 bit at least? GCC says that it supports long long, but
i got this:
#include <stdio.h>
#include <limits.h>

int main()
{
printf("Maximum value for long long: %lld\n", LLONG_MAX);
printf("Maximum value for long: %ld\n", LONG_MAX); gcc version 3.3.1 (mingw special 20030804-1) C:\c>\mingw\bin\gcc -std=c99 -pedantic-errors -O3 -Wall temp.c -o temp
temp.c: In function `main'':
temp.c:6: error: `LLONG_MAX'' undeclared (first use in this function)
temp.c:6: error: (Each undeclared identifier is reported only once
temp.c:6: error: for each function it appears in.)




我不要不记得3.3.1是否有标题问题,但3.3.2给了我:


长期最大值:9223372036854775807

最大值长:2147483647



I don''t remember if 3.3.1 had a header problem, but 3.3.2 gives me:

Maximum value for long long: 9223372036854775807
Maximum value for long: 2147483647


这篇关于很久很久的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆