标准库 [英] standard libraries

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

问题描述

托管实现是否需要任何特定的库才能将b $ b视为标准C编译器?

-

_ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ /

_ /一切都应该尽可能简单,但不能简单。

_ / - Albert Einstein

_ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ /

解决方案

Jim Showalter写道:


托管实现是否需要任何特定的库才能

被认为是标准的C编译器?



我认为标准C库(至少)应该存在。

在任何情况下,没有任何库的编译器都不是很有用......


jacob


Jim Showalter说:


托管实现是否需要任何特定的库才能将
视为标准C编译器?



托管实现必须提供所有标准库函数,但

标准没有说明它们必须以什么形式提供。< br $>

-

Richard Heathfield

Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk

电子邮件:rjh在上面的域名(但显然放弃了www)


Jim Showalter写道:
< blockquote class =post_quotes>
>

托管实现是否需要

任何特定的库才能被认为是
一个标准的C编译器?



是。


C89,托管:

< assert.h< locale。 h< stddef.h>

< ctype.h< math.h< stdio.h>

< errno.h< setjmp.h< stdlib.h>

< float.h< signal.h< string.h>

< limits.h< stdarg.h< time.h>


C89,独立:

< float.h< limits.h< stdarg.h>

< stddef.h>


C99,托管:

< assert.h< complex.h< ctype.h>

< errno.h< fenv。 h< float.h>

< inttypes.h< iso646.h< limits.h>

< locale.h< math.h< setjmp.h>

< signal.h< stdarg.h< stdbool.h>

< stddef.h< stdint.h< stdio.h>

< stdlib.h< string.h< tgmath.h>

< time.h< wchar.h< wctype.h>


C99,独立

< float.h< iso646.h< limits.h>

< stdarg.h< stdbool.h< ; stddef.h>

< stdint.h>


-

pete


Does a hosted implementation require any particular libraries in order to be
considered a standard C compiler?
--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Everything should be made as simple as possible, but not simpler.
_/ -- Albert Einstein
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

解决方案

Jim Showalter wrote:

Does a hosted implementation require any particular libraries in order to be
considered a standard C compiler?

I suppose that the standard C library (at least) should be present.
In any case a compiler without any library is not very useful...

jacob


Jim Showalter said:

Does a hosted implementation require any particular libraries in order to
be considered a standard C compiler?

A hosted implementation must provide all the standard library functions, but
the Standard does not say in what form they must be provided.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)


Jim Showalter wrote:

>
Does a hosted implementation require
any particular libraries in order to be
considered a standard C compiler?

Yes.

C89, hosted:
<assert.h<locale.h<stddef.h>
<ctype.h<math.h<stdio.h>
<errno.h<setjmp.h<stdlib.h>
<float.h<signal.h<string.h>
<limits.h<stdarg.h<time.h>

C89, freestanding:
<float.h<limits.h<stdarg.h>
<stddef.h>

C99, hosted:
<assert.h<complex.h<ctype.h>
<errno.h<fenv.h<float.h>
<inttypes.h<iso646.h<limits.h>
<locale.h<math.h<setjmp.h>
<signal.h<stdarg.h<stdbool.h>
<stddef.h<stdint.h<stdio.h>
<stdlib.h<string.h<tgmath.h>
<time.h<wchar.h<wctype.h>

C99, freestanding
<float.h<iso646.h<limits.h>
<stdarg.h<stdbool.h<stddef.h>
<stdint.h>

--
pete


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

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