What are “extended integer types”?

社会主义新天地 提交于 2019-11-27 16:13:51

问题


Quoting from the book I'm reading:

  1. signed char, signed short int, signed int, signed long int, signed long long int are called standard signed integer types
  2. unsigned char, unsinged short int, unsigned int, unsigned long int, unsinged long long int, _Bool are called standard unsigned integer types
  3. In addition to the standard integer types, the C99 standard allows implementation-defined extended integer types, both signed and unsigned. For example, a compiler might be provide signed and unsigned 128-bit integer types.

I've problem with 3rd point. What are these "extended integer types"? Any examples?


回答1:


An example of the extended integer type is the __int64 64-bit signed integer type defined by MS Visual C. While this type is obviously an integral type, in older versions of MSVC it could not be obtained as int, long int, nor long long int. (MSVC added support for long long int in the meantime.)




回答2:


Extended integer types are implementation-specific integer types that are provided as an extension. Because almost everything about such extensions is implementation-defined, the standard can’t say much about them. However, a C++09 proposal provides a framework for implementing such extensions in a way that doesn’t interfere with the behavior of standard compliant programs.

you should refer this,which covers everything about extended integer types.



来源:https://stackoverflow.com/questions/13403600/what-are-extended-integer-types

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!