scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit 9e40c0c4f8f15b13a2a39bab393f5a921ec83275
parent 2fc8ee279b55d1da274fc17ef6ab73efcdd1c206
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 15 Apr 2014 11:17:56 +0200

Fix compare()

There were some switch cases where break was missed.

Diffstat:
expr.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/expr.c b/expr.c @@ -184,6 +184,7 @@ compare(char op, Node *np1, Node *np2) default: goto incompatibles; } + break; case FLOAT: switch (t2) { case INT: @@ -196,13 +197,14 @@ compare(char op, Node *np1, Node *np2) defualt: goto incompatibles; } + break; case ARY: case FTN: np1 = addr2ptr(np1); tp1 = UNQUAL(np1->type); - break; case PTR: if (tp1 != tp2) goto incompatibles; + break; default: goto incompatibles; }