anthropics / anthropics/claudes-c-compiler
ice(): _Alignas() with a negative number
Open
- Dominant language
- Rust
- Stars
- 2.8k
- Forks
- 247
- PR merge metrics
- No merged PRs in 30d
Description
that C code
```c
#include
#include
void greet() {}
struct {} _Alignas(-1) MinusOne;
int main() {
unsigned MinusOne = -1;
}
```
when you try to compile it, you will see an internal compiler error not a regular compiler error
```rust
thread '' (18932) panicked at src/backend/common.rs:1116:9:
alignment must be power of 2
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
ccc: internal error: alignment must be power of 2
```
Instead of handling the invalid code
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.