scc

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

commit 3434e20db04edbf858d3e128531b186c8aabcee0
parent beef986e3e0d7efc6a210bb80a2019efd2cee6ae
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 17 Apr 2014 15:51:35 +0200

Add comments about types in modulo

modulo operation only can be performed with integers, but now it
is accepted also floats.

Diffstat:
Mexpr.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/expr.c b/expr.c @@ -522,7 +522,7 @@ mul(void) switch (yytoken) { case '*': op = OMUL; break; case '/': op = ODIV; break; - case '%': op = OMOD; break; + case '%': op = OMOD; break; /* TODO: check int type */ default: return np; } next();