[hackers] [scc] Put correct printf format when printing constants || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Tue, 18 Aug 2015 10:02:55 +0200 (CEST)

commit 8a62641325823bc830ca03e1ab2c3d63e0a36922
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Mon Aug 17 14:39:10 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Mon Aug 17 14:39:10 2015 +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.

diff --git a/cc1/code.c b/cc1/code.c
index 01a641b..84f209e 100644
--- a/cc1/code.c
+++ b/cc1/code.c
_AT_@ -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:
                 /*
Received on Tue Aug 18 2015 - 10:02:55 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 18 2015 - 10:12:17 CEST