Re: __UINT_LEAST8_MAX__ and HP-UX 11.23/IA

Albert Chin <[email protected]>
Newsgroups gmane.comp.parsers.bison.bugs
Message-ID <[email protected]>
On Wed, Jan 20, 2021 at 12:25:09PM -0600, Albert Chin wrote:
> In data/skeletons/c.m4 from bison-3.7.4, we have:
>   #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
>   typedef __UINT_LEAST8_TYPE__ yytype_uint8;
>   #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
>          && UINT_LEAST8_MAX <= INT_MAX)
>   typedef uint_least8_t yytype_uint8;
>   #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
>   typedef unsigned char yytype_uint8;
>   #else
>   typedef short yytype_uint8;
>   #endif
> 
> Unfortunately, on HP-UX 11.23/IA, UINT_LEAST8_MAX evaluates to
> ((unsigned char)(255)) causing a problem with:
>   #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
>          && UINT_LEAST8_MAX <= INT_MAX)

This is also an issue for UINT_LEAST16_MAX.

-- 
albert chin ([email protected])
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.