[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stdbool module unconditionally #define true
From: |
Bruno Haible |
Subject: |
Re: stdbool module unconditionally #define true |
Date: |
Sat, 15 Oct 2022 02:21:09 +0200 |
Paul Eggert wrote:
> > Shouldn't the following cause a compilation error?
> >
> > root@18544d251872:/# cat>foo.c
> > int main (void) {
> > int true = 42;
> > return true;
> > }
>
> Yes if you have a C23 compiler, which GCC 12 isn't. To get a proper
> compilation error you will have to wait for a future GCC release ...
clang 15 already supports this part of C23. I installed the clang-15.0.2
binaries from https://github.com/llvm/llvm-project/releases/tag/llvmorg-15.0.2
on a CentOS 8-stream machine, and it produces the error that you expect: