diff options
author | Michael Forney <mforney@mforney.org> | 2024-04-07 05:14:47 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2024-04-07 13:29:14 -0700 |
commit | bf28b11e50f287f1b32c4828b0ea1b5d9b9fd0e2 (patch) | |
tree | 2767dce29f7f9cc7c518769511acc5b0f9e8f08a | |
parent | a4a041b34cf96421a52fca155f65701beab926b4 (diff) |
eval: Use enum instead of define for float/signed flags
-rw-r--r-- | eval.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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) |