Skip to content

Conversation

@terryc321
Copy link

use standard boolean c library allows compilation to complete otherwise gcc clang complain and stop with error

[ 96%] Building C object tools/CMakeFiles/cmprev.dir/src/cmprev.c.o self/tools/src/cmprev.c:16:16: error: cannot use keyword ‘false’ as enumeration constant
16 | typedef enum { false, true } bool;
| ^~~~~
self/self/tools/src/cmprev.c:16:16: note: ‘false’ is a keyword with ‘-std=c23’ onwards
self/self/tools/src/cmprev.c:16:30: error: expected ‘;’, identifier or ‘(’ before ‘bool’
16 | typedef enum { false, true } bool;
| ^~~~

use standard boolean c library allows compilation to complete
otherwise gcc clang complain and stop with error

[ 96%] Building C object tools/CMakeFiles/cmprev.dir/src/cmprev.c.o
self/tools/src/cmprev.c:16:16: error: cannot use keyword ‘false’ as enumeration constant
   16 | typedef enum { false, true } bool;
      |                ^~~~~
self/self/tools/src/cmprev.c:16:16: note: ‘false’ is a keyword with ‘-std=c23’ onwards
self/self/tools/src/cmprev.c:16:30: error: expected ‘;’, identifier or ‘(’ before ‘bool’
   16 | typedef enum { false, true } bool;
      |                              ^~~~
@nbuwe
Copy link
Contributor

nbuwe commented Jan 7, 2026

Just use CC='cc -std=gnu99' or something (ditto for CXX) to compile on your system. Self sources can still be compiled on quite old systems (e.g. macosx/powerpc with gcc 4.0). Your system compiler might have switched to C23 by default, but that doesn't mean you have to use that default to compile Self.

Note also, that non-vintage clang (13+, iirc) miscompiles Self and cannot be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants