casaroli opened a new pull request, #20535: URL: https://github.com/apache/nuttx/pull/20535
## Summary C99 7.16 requires `true` and `false` to expand to the integer constants 1 and 0, suitable for use in `#if`. NuttX defines them as `(bool)1` and `(bool)0`, so a preprocessor condition such as `#if !true` does not compile: ``` error: missing binary operator before token "1" ``` With the new option `CONFIG_STDBOOL_INTEGER_CONSTANTS` they are 1 and 0. The values do not change; only their type in an expression changes, from `bool` to `int`, as the standard requires. ## Impact New option, default n, depends on `!ARCH_STDBOOL_H`. Without it nothing changes. ## Testing Builds: `qemu-armv8a:knsh` with and without the option. With it, `#if !true` compiles. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
