NO

Author Topic: RSIZE_MAX in stdlib.h  (Read 4213 times)

Griffin

  • Guest
RSIZE_MAX in stdlib.h
« on: May 24, 2017, 10:12:45 AM »
RSIZE_MAX is defined in stdint.h, but protected from compilation by "#if __POCC_TARGET__ == 3".

However, this feature is C11 related, not connected to a target. When compiling for X86, __POCC_TARGET__ is 1, not 3 (AMD64). Should this not have been guarded by #if __STDC_VERSION__ == 201112L" or something like that that?

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: RSIZE_MAX in stdlib.h
« Reply #1 on: May 24, 2017, 07:20:56 PM »
The macro defined in <stdint.h> is:
Code: [Select]
#if __POCC_TARGET__ == 3
#define RSIZE_MAX  INT64_MAX
#else
#define RSIZE_MAX  INT32_MAX
#endif
And is always defined, with different values for __POCC_TARGET__  == 3  and __POCC_TARGET__ = 1, respectively for X64 and X32 code.
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide