Open
Description
Summary
Clang 21 accepts invalid standalone # 0 preprocessor lines in C source files without emitting an error or a warning. When compiled, the program exhibits undefined behavior (e.g., prints unlimited spaces or crashes), despite the code being syntactically invalid.
Program
uint32_t square(uint32_t x)
# 0
# 0
To reproduce Quickly
https://gcc.godbolt.org/z/c1daT34v6
It gets:
[Truncated]
Compiler returned: 143