mycoboco / beluga

a standard C compiler (with an integrated preprocessor)
http://code.woong.org/beluga
Other
65 stars 8 forks source link

recognize type definitions whenever possible #137

Open mycoboco opened 5 years ago

mycoboco commented 5 years ago
typedef float foo

foo main() {}
t.c:1:18: ERROR - syntax error; expected `;' before `identifier'
  typedef float foo
                   ^
t.c:3:1: ERROR - unknown type `foo'
  foo main() {}
  ^~~
t.c:3:1: ERROR - redeclaration of `foo'
  foo main() {}
  ^~~