diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-11-08 14:42:45 -0500 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2023-11-08 14:43:23 -0500 |
| commit | 52d8099daeb34edc00898ef8cc34bd6f136949aa (patch) | |
| tree | 5ba0c3e59317e8dd97b90bc6b151022764b037ff | |
| parent | 045a5e924ce9abe239634545b0ad35576cc2fafc (diff) | |
| download | zig-52d8099daeb34edc00898ef8cc34bd6f136949aa.tar.gz zig-52d8099daeb34edc00898ef8cc34bd6f136949aa.zip | |
Sema: don't allow passing non-extern types to varargs parameters
| -rw-r--r-- | src/Sema.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index 241f65a9a0..0911f75feb 100644 --- a/src/Sema.zig +++ b/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) { |
