mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
This does not completely ignore static asserts - they are validated by aro during parsing; any failures will render an error and non-zero exit code. Emit a warning comment that _Static_asserts are not translated - this matches the behavior of the existing clang-based translate-c. Aro currently does not store source locations for _Static_assert declarations so I've hard-coded token index 0 for now.
7 lines
147 B
C
7 lines
147 B
C
_Static_assert(1 == 1, "");
|
|
|
|
// translate-c
|
|
// target=x86_64-linux
|
|
// c_frontend=aro
|
|
//
|
|
// tmp.c:1:1: warning: ignoring _Static_assert declaration
|