claws
claws

Reputation: 54100

What are "extended integer types"?

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, unsigned short int, unsigned int, unsigned long int, unsigned 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?

Upvotes: 21

Views: 7233

Answers (2)

user4815162342
user4815162342

Reputation: 154911

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.)

Upvotes: 6

joey rohan
joey rohan

Reputation: 3566

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.

Upvotes: 7

Related Questions