harec

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

commit 9f619bd972e0c0f24b9a6285ba65bb1b4a739694
parent 8ab670292938454e5997391d575fc26d2d9710f0
Author: Lassi Pulkkinen <lassi@pulk.fi>
Date:   Thu,  2 Feb 2023 17:28:46 +0200

gen: Copy unions with gen_copy_aligned

This appears to be historical oversight.

Signed-off-by: Lassi Pulkkinen <lassi@pulk.fi>

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

diff --git a/src/gen.c b/src/gen.c @@ -118,14 +118,12 @@ gen_store(struct gen_context *ctx, case STORAGE_SLICE: case STORAGE_STRING: case STORAGE_STRUCT: + case STORAGE_UNION: case STORAGE_TAGGED: case STORAGE_TUPLE: case STORAGE_VALIST: gen_copy_aligned(ctx, object, value); return; - case STORAGE_UNION: - gen_copy_memcpy(ctx, object, value); - return; case STORAGE_ENUM: object.type = ty->alias.type; break;