Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22011

Maximum size of size_t

$
0
0

I know in C return type of sizeof operator is size_t being unsigned integer type defined in <stdint.h>. Which means max size of it should be 65535 as stated in C99 standard 7.18.3:

limit of size_t  SIZE_MAX             65535

However in gcc-4.8.2 header file stdint.h has defined its size much greater than 65535 contradicting to which is stated in C99 standard as below shown,

/* Limit of `size_t' type.  */# if __WORDSIZE == 64#  define SIZE_MAX              (18446744073709551615UL)# else#  define SIZE_MAX              (4294967295U)# endif

Kindly help me in understanding why there is a difference or reason behind my misinterpretation.


Viewing all articles
Browse latest Browse all 22011

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>