scc

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

commit abf79a2fe6621ed253aa4559e06cc20d1189ff4b
parent e1468117aa0dcf5b43dfec797a8dbfb3531d3bff
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat,  9 Aug 2014 20:58:36 +0200

accept comparation of ineteger types

If two integer types are compared and they have a different integer
address then it means they are different types, so we have to return
false and not abort.

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

diff --git a/cc1/types.c b/cc1/types.c @@ -290,8 +290,8 @@ eqtype(Type *tp1, Type *tp2) if (!eqtype(tp1->type, tp2->type)) return 0; return tp1->u.nelem == tp2->u.nelem; - case ENUM: - return 1; + case ENUM: case INT: case FLOAT: + return tp1->letter == tp2->letter; default: fputs("internal type error, aborting\n", stderr); abort();