Commit: 331f8407a09cf9b27f6103f95d3a7b3ddc9bc8dd
Parent: b19705071b7a92e382f61f380985fbc9b1b117ac
Author: Randy Palamar
Date: Mon, 2 Nov 2026 04:52:08 -0800
build: move result variable after setjmp
at some point GCC started complaining that this might get
clobbered even though build_fatal is marked as no_return (probably
a GCC bug).
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/build.c b/build.c
@@ -3895,7 +3895,6 @@ metagen_emit_c_str8_list(MetaprogramContext *m, str8 *strs, u32 count)
function b32
metagen_emit_c_code(MetaContext *ctx, Arena *arena)
{
- b32 result = 1;
char *out, *out_shaders;
{
str8 basename;
@@ -3927,6 +3926,8 @@ metagen_emit_c_code(MetaContext *ctx, Arena *arena)
build_fatal("Failed to generate C Code");
}
+ b32 result = 1;
+
////////////////////////////
// NOTE(rnp): shader baking
if (ctx->base_shader_count) {