From bf28b11e50f287f1b32c4828b0ea1b5d9b9fd0e2 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sun, 7 Apr 2024 05:14:47 -0700 Subject: eval: Use enum instead of define for float/signed flags --- eval.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/eval.c b/eval.c index 8de1316..3e83085 100644 --- a/eval.c +++ b/eval.c @@ -4,8 +4,11 @@ #include "util.h" #include "cc.h" -#define F (1<<8) -#define S (2<<8) +enum { + F = 1<<8, + S = 2<<8 +}; + static void cast(struct expr *expr) { @@ -96,8 +99,6 @@ binary(struct expr *expr, enum tokenkind op, struct expr *l, struct expr *r) } cast(expr); } -#undef F -#undef S struct expr * eval(struct expr *expr) -- cgit v1.2.3