scc

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

commit f7bbcdf04512a97a853a07c9bdc635566f0f735a
parent 0f2dd088e38f30bf5f32729457bb3481c0ec9f9f
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed,  6 Aug 2014 08:48:54 +0200

Fix ctype() error detection

The error detection inserted in cdbda61 only works if there is
no fallthrough between cases

Diffstat:
Mcc1/types.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/cc1/types.c b/cc1/types.c @@ -141,6 +141,7 @@ ctype(int8_t type, int8_t sign, int8_t size) case LONG+LONG: return (sign == UNSIGNED) ? ullongtype : llongtype; } + break; case FLOAT: switch (size) { case 0: @@ -150,6 +151,7 @@ ctype(int8_t type, int8_t sign, int8_t size) case LONG+LONG: return ldoubletype; } + break; } fputs("internal type error, aborting\n", stderr); abort();