NO

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

Offline Griffin

  • Member
  • *
  • Posts: 1
RSIZE_MAX in stdlib.h
« on: May 24, 2017, 09: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: 1571
Re: RSIZE_MAX in stdlib.h
« Reply #1 on: May 24, 2017, 06: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.