mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
fix: use helper printing macros, to use the correct printing width (e.g. %llu vs %lu)
This commit is contained in:
committed by
Christoffer Lerno
parent
f5cea221a6
commit
43efb7df2f
@@ -1,5 +1,6 @@
|
||||
#include "c_codegen_internal.h"
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
typedef struct OptionalCatch_
|
||||
{
|
||||
@@ -346,11 +347,11 @@ static void c_emit_const_expr(GenContext *c, CValue *value, Expr *expr)
|
||||
}
|
||||
if (type_is_unsigned(t))
|
||||
{
|
||||
PRINTF("%s ___var_%d = %llu;\n", c_type_name(c, t), c_emit_temp(c, value, t), expr->const_expr.ixx.i.low);
|
||||
PRINTF("%s ___var_%d = %" PRIu64 ";\n", c_type_name(c, t), c_emit_temp(c, value, t), expr->const_expr.ixx.i.low);
|
||||
}
|
||||
else
|
||||
{
|
||||
PRINTF("%s ___var_%d = %lld;\n", c_type_name(c, t), c_emit_temp(c, value, t), expr->const_expr.ixx.i.low);
|
||||
PRINTF("%s ___var_%d = %" PRId64 ";\n", c_type_name(c, t), c_emit_temp(c, value, t), (int64_t)expr->const_expr.ixx.i.low);
|
||||
}
|
||||
return;
|
||||
case CONST_BOOL:
|
||||
|
||||
Reference in New Issue
Block a user