]> git.draconx.ca Git - cdecl99.git/commitdiff
Fix parser build on compilers without _Bool.
authorNick Bowler <nbowler@draconx.ca>
Sun, 3 Dec 2023 20:14:38 +0000 (15:14 -0500)
committerNick Bowler <nbowler@draconx.ca>
Mon, 4 Dec 2023 05:24:26 +0000 (00:24 -0500)
Although we have a perfectly fine replacement for compilers that do
not implement _Bool, we have to have #include <stdbool.h> in order
to get it, which was missing from the parser header.

src/parse.y

index 14d593ef1622f57a97d0b5bbb26023a07ce0fafb..c66a803a9e57d66512d186f9f3aa97f2a6b51464 100644 (file)
@@ -120,6 +120,7 @@ static size_t yytnamerr_copy(char *dst, const char *src)
 
 %code requires {
 #include <inttypes.h>
+#include <stdbool.h>
 }
 
 %code provides {
@@ -131,7 +132,7 @@ const char *cdecl__token_name(unsigned token);
 %union {
        uintmax_t uintval;
        unsigned spectype;
-       _Bool boolval;
+       bool boolval;
        struct cdecl_declspec *declspec;
        struct cdecl_declarator *declarator;
        struct cdecl *decl;