harec

[hare] Hare compiler, written in C11 for POSIX OSs
Log | Files | Refs | README | LICENSE

commit edd62c1d8fccfa7b8c8ab21c944a38dc8b7b8deb
parent b8a480fa2cf95b6df2eea64c491aed14ab6ac69d
Author: Drew DeVault <sir@cmpwn.com>
Date:   Tue,  7 Jun 2022 13:06:52 +0200

typedef: fix uintptr enums (again)

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Msrc/typedef.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/typedef.c b/src/typedef.c @@ -127,6 +127,8 @@ emit_const(const struct expression *expr, FILE *out) char *ident = identifier_unparse(&t->alias.ident); if (t->alias.type->storage == STORAGE_CHAR) { fprintf(out, "%" PRIuMAX, val->uval); + } else if (t->alias.type->storage == STORAGE_UINTPTR) { + fprintf(out, "%" PRIuMAX ": uintptr", val->uval); } else if (type_is_signed(t->alias.type)) { fprintf(out, "%" PRIiMAX "%s: %s", val->ival, storage_to_suffix(t->alias.type->storage), ident);