1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-04 23:33:05 +00:00
cc65/test/val/bug2523.c
Kugel Fuhr 9c69aac097 Fix some issues with signedness in preprocessor expressions. Do also disallow
comma expressions since the aren't compliant and collide with macro invocations.
2024-09-17 11:45:46 +02:00

30 lines
270 B
C

#if (0u - 1) < 0
#error
#endif
#if !1u - 1 > 0
#error
#endif
#if (1 & 1u) - 2 < 0
#error
#endif
#if (1 | 1u) - 2 < 0
#error
#endif
#if (1 ^ 1u) - 2 < 0
#error
#endif
#if (1u >> 1) - 2 < 0
#error
#endif
#if (0u << 1) - 1 < 0
#error
#endif
int main() { return 0; }