scc

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

commit 8a62641325823bc830ca03e1ab2c3d63e0a36922
parent abdf69a520ddaf86c5bef1ce52a64dea1f3b5e77
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon, 17 Aug 2015 14:39:10 +0200

Put correct printf format when printing constants

The type of integer constant is going depend of the target,
but at this moment we know that it is a long, so fix it and
we will see what we do later.

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

diff --git a/cc1/code.c b/cc1/code.c @@ -183,7 +183,7 @@ emitconst(Node *np) switch (BTYPE(np)) { case INT: - printf("#%c%X", np->type->letter, sym->u.i); + printf("#%c%lX", np->type->letter, (long) sym->u.i); break; case ARY: /*