Commit 52d8099dae

Jacob Young <jacobly0@users.noreply.github.com>
2023-11-08 20:42:45
Sema: don't allow passing non-extern types to varargs parameters
1 parent 045a5e9
Changed files (1)
src/Sema.zig
@@ -29436,6 +29436,7 @@ fn coerceVarArgParam(
             }
         },
         else => if (uncasted_ty.isAbiInt(mod)) int: {
+            if (!try sema.validateExternType(uncasted_ty, .param_ty)) break :int inst;
             const target = sema.mod.getTarget();
             const uncasted_info = uncasted_ty.intInfo(mod);
             if (uncasted_info.bits <= target.c_type_bit_size(switch (uncasted_info.signedness) {