Pelles C forum

Pelles C => Bug reports => Topic started by: Griffin on May 24, 2017, 10:12:45 AM

Title: RSIZE_MAX in stdlib.h
Post by: Griffin 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?
Title: Re: RSIZE_MAX in stdlib.h
Post by: frankie 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.