anthropics / anthropics/claudes-c-compiler

A... couple... of type checking bugs

Aberta
#57 4 comentários 6 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Rust
Estrelas
2.8k
Forks
247
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

I considered doing separate issues for these but I'm assuming there's some common root cause.
```c
int g() {}
int main(void)
{
int arr[1] = {NULL, 3, "lol"[arr]};
struct { int x, y, z; } s = { "oops", arr, &s, 42 };
union { int i; float f; } u;
int x = u + s;
s = g;
return &s;
}
```
Compiler is awake and sees the problem immediately.
```
% ./target/release/ccc -o a /tmp/a.c
/tmp/a.c:2:1: warning: control reaches end of non-void function [-Wreturn-type]
int g() {}
^~~
```
100% would recommend, much more exciting to use than GCC!

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.