下面这个Compiler claims to be ANSI C level 1是什么意思?

visame 2007-11-06 11:48:54
下面这个Compiler claims to be ANSI C level 1是什么意思?
ANSI C level 1的数据长度必须符合如下规范吗?
char必须要是8位?int必须要是32位?
感觉像是VC6的标准?
***************************************************
Compiler claims to be ANSI C level 1

Compiler names are at least 64 chars long
Preprocessor names are at least 64 long

SIZES
char = 8 bits, signed
short=16 int=32 long=32 float=32 double=64 bits
long double=128 bits
char*=32 bits
int* =32 bits
func*=32 bits
Type size_t is unsigned int/long
Type wchar_t is signed int/long

ALIGNMENTS
char=1 short=2 int=4 long=4
float=4 double=8
long double=8
char*=4 int*=4 func*=4

CHARACTER ORDER
short: AB
int: ABCD
long: ABCD

PROPERTIES OF POINTERS
Char and int pointer formats seem identical
Char and function pointer formats seem identical
Strings are shared
Type ptrdiff_t is signed int/long
Dereferencing NULL causes a trap

PROPERTIES OF INTEGRAL TYPES
Overflow of a short does not generate a trap
Maximum short = 32767 (= 2**15-1)
Minimum short = -32768
Overflow of an int does not generate a trap
Maximum int = 2147483647 (= 2**31-1)
Minimum int = -2147483648
Overflow of a long does not generate a trap
Maximum long = 2147483647 (= 2**31-1)
Minimum long = -2147483648
Maximum unsigned short = 65535
Maximum unsigned int = 4294967295
Maximum unsigned long = 4294967295
...全文
123 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
0黄瓜0 2007-11-06
  • 打赏
  • 举报
回复
UP

65,183

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧