Re: Bash fails to compile with GCC 15 / C23 due to bool typedef in basha
From:
Martin D Kealey
Subject:
Re: Bash fails to compile with GCC 15 / C23 due to bool typedef in bashansi.h
Date:
Fri, 28 Nov 2025 10:21:58 +1000
On Fri, 28 Nov 2025 at 02:03, hao a <ahaoboy0201@gmail.com> wrote:
> -typedef unsigned char bool;
> + typedef unsigned char bool;
>
May I suggest instead:
-typedef unsigned char bool;
> + #include <stdint.h>
> + typedef uint_fast8_t bool;
(This allows the compiler to choose a different representation if it would
be faster.)
-Martin