Skip to content

Conversation

edgar-bonet
Copy link
Contributor

This is a backport of commit 32bbb4f (pull request #188). It targets the branch at91bootstrap-3.x, which has the exact same code in include/types.h as the 4.x branch (only the comments differ).

include/types.h typedefs 'bool' and macro-defines 'false' and 'true'.
However, since C23, these are predefine keywords. As C23 is the default
C dialect for GCC 15, building with this compiler fails with:

    include/types.h:23:23: error: 'bool' cannot be defined via 'typedef'
       23 | typedef unsigned char bool;
          |                       ^~~~
    include/types.h:23:23: note: 'bool' is a keyword with '-std=c23' onwards

Fix this build failure by only defining 'bool', 'false' and 'true' on C
dialects older than C23.

Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
(cherry picked from commit 32bbb4f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant