Re: 128-bit integer - nonsensical documentation?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27 August 2015 at 08:11, David Brown wrote:
> Is that allowed even if __int128 is not an "extended integer"?  I can
> see why gcc would not want to make __int128 an extended integer, if it
> then causes knock-on effects such as changing intmax_t.  But if the
> standards allow for literals of type __int128 even if it is not defined
> as an extended integer, then that might be a nice feature to make the
> type more complete and consistent.

If the literal used a syntax that is not valid in ISO C then it would
be a valid extension, because its existence would not affect valid ISO
C programs that don't use it.

> Are you allowed to include typedefs for uint128_t and int128_t in
> <stdint.h>, or would that also only be allowed if it is a proper
> extended integer?

Those names are not in the namespace reserved for the implementation,
so doing that would cause this valid code to fail to compile:

#include <stdint.h>
typedef struct { } uint128_t;
int main() { }



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux