Allow $defined take declarations: $defined(int x = y)

Taking the address of a label would cause a crash. #2430
This commit is contained in:
Christoffer Lerno
2025-08-23 12:00:17 +02:00
parent f36e9fea48
commit e4e499edd2
16 changed files with 109 additions and 56 deletions

View File

@@ -130,7 +130,7 @@ macro atan2(x, y)
@require values::@is_int(x) || values::@is_float(x) : "Expected an integer or floating point value"
@require @typekind(sinp) == POINTER : "Expected sinp to be a pointer"
@require @typematch(sinp, cosp) : "Expected sinp and cosp to have the same type"
@require @assignable_to(x, $typeof(*sinp)) : "Expected x and sinp/cosp to have the same type"
@require $defined(*sinp = x) : "Expected x and sinp/cosp to have the same type"
*>
macro sincos_ref(x, sinp, cosp)
{