harec

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

commit aef98a91675367e7d408d56488f82c2e1c78e29a
parent 4730fa6b835f08c44bd7991cc8b264fbc27d752b
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 13 Feb 2023 11:48:09 +0100

src/gen: Rename *constexpr to *constant

This fixes compilation with cproc, constexpr bein a keyword in C23.

Picked *constant to correspond to the same assignment in the
gen_data_item function.

Diffstat:
Msrc/gen.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gen.c b/src/gen.c @@ -1882,9 +1882,9 @@ static void gen_const_string_at(struct gen_context *ctx, const struct expression *expr, struct gen_value out) { - const struct expression_constant *constexpr = &expr->constant; - const char *val = constexpr->string.value; - size_t len = constexpr->string.len; + const struct expression_constant *constant = &expr->constant; + const char *val = constant->string.value; + size_t len = constant->string.len; // TODO: Generate string data structure as global also? struct qbe_value global = mkqtmp(ctx, ctx->arch.ptr, "strdata.%d");