scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit f03283b0bb20076bcdb814658bde66f5c042968c
parent 1dcded18a01420a8f57227792522897bcf919a88
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon, 17 Aug 2015 21:24:24 +0200

Fix integer declarations

There were a few errors, one that generated error in 'long long'
and a false warning in declarations without int or char keywords.

Diffstat:
Mcc1/decl.c | 3++-
Mcc1/types.c | 1-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cc1/decl.c b/cc1/decl.c @@ -301,7 +301,8 @@ specifier(int *sclass) break; case LONG: if (size == LONG) { - size = LLONG; + yylval.token = LLONG; + size = 0; break; } case SHORT: diff --git a/cc1/types.c b/cc1/types.c @@ -222,7 +222,6 @@ ctype(unsigned type, unsigned sign, unsigned size) goto invalid_type; return booltype; case 0: - warn("type defaults to 'int' in declaration"); /* fallthrough */ case INT: switch (size) {