P99
#define P99_UINT_DEFAULT (   T)    __typeof__(P99_GENERIC_SIZE_LIT(sizeof(T), (uintptr_t){ 0 }, P00_UINT_TYPE_LIST))

A default unsigned integer type for type T.

Returns:
The result is an unsigned integer type of the same width as T, if such an integer type exists. Otherwise, the type is uintptr_t, an unsigned integer type that should be compatible with address arithmetic.

If T has the same width the result is uintptr_t. Otherwise, the result type is chosen from uint8_t, uint16_t, uint32_t and uint64_t. If none fits the width, we fall back on uintptr_t.

As a consequence, if T is an integer type and the implementation has another integer type of the same width, this is not necessarily the integer type "corresponding" to T. E.g if T is long long and has the same width as long, the result type could well be unsigned long instead of unsigned long long.

Remarks:
Uses the __typeof__ extension of the gcc-family of compilers.
argument 0 should correspond to a type that is not a VLA.

Definition at line 339 of file p99_atomic.h.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines