harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b84f6ea88d837435b305413569acea4314c600d2
parent e182a979899e7b964064c4e0c51029a616c91d32
Author: Drew DeVault <sir@cmpwn.com>
Date:   Fri,  2 Jul 2021 10:21:51 -0400

gen: implement f32, f64 constants

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

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

diff --git a/src/gen.c b/src/gen.c @@ -134,9 +134,13 @@ gen_expr_constant(struct gen_context *ctx, case STORAGE_UINTPTR: constl(&qval, constexpr->uval); break; - case STORAGE_POINTER: case STORAGE_F32: + consts(&qval, constexpr->fval); + break; case STORAGE_F64: + constd(&qval, constexpr->fval); + break; + case STORAGE_POINTER: case STORAGE_ARRAY: case STORAGE_NULL: case STORAGE_SLICE: