mewmew / uc

A compiler for the µC language.
57 stars 5 forks source link

semantic: Parameters of function declarations are added to scope #59

Closed mewmew closed 8 years ago

mewmew commented 8 years ago

Parameters of function declarations are added to scope, and they shouldn't be.

Checking "eval.c"
(eval.c:22) error: redefinition of "s" with type "char[]" instead of "char[80]"
void getstring(char s[]);
                    ^

Relevant parts of testdata/noisy/advanced/eval.c:

void getstring(char s[]);
void putstring(char s[]);
void putint(int i);

int p;
char s[80];