chibicc icon indicating copy to clipboard operation
chibicc copied to clipboard

redeclaration as different kind of symbol is not reported

Open krofna opened this issue 4 years ago • 1 comments

#include <stdio.h>

int x;

int x()
{
    puts("Hello World");
}

int main()
{
    x();
}

This should not compile.

krofna avatar Feb 12 '21 15:02 krofna

Apparently other kinds of redefinition are not reported either

#include <stdio.h>

int f(int x)
{
    int x;
    puts("Hello world");
}

int main()
{
    f(0);
}

krofna avatar Feb 12 '21 17:02 krofna