From a0afcf702854ad4b7aadf25ac5c87d477db12947 Mon Sep 17 00:00:00 2001 From: "Quirin F. Schroll" Date: Wed, 4 Jun 2025 18:20:05 +0200 Subject: [PATCH] Update function.dd --- spec/function.dd | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/spec/function.dd b/spec/function.dd index 6b6bc787cd..4d7b8a0827 100644 --- a/spec/function.dd +++ b/spec/function.dd @@ -3600,17 +3600,16 @@ void main() --- ) - $(P The function must have a $(GLINK SpecifiedFunctionBody).) + $(P The function must have a $(GLINK FunctionBody).) $(P CTFE is subject to the following restrictions:) $(OL - $(LI Expressions may not reference any global or local - static variables.) + $(LI Expressions may not reference any mutable static variables.) $(LI $(DDSUBLINK spec/iasm, asmstatements, AsmStatements) are not permitted) - $(LI Non-portable casts (eg, from $(D int[]) to $(D float[])), including + $(LI Non-portable casts (e.g., from $(D int[]) to $(D float[])), including casts which depend on endianness, are not permitted. Casts between signed and unsigned types are permitted.) @@ -3656,7 +3655,7 @@ void main() ) $(LI - Equality comparisons (==, !=, $(D_KEYWORD is), $(D_KEYWORD !is)) are + Equality comparisons ($(D ==), $(D !=), $(D is), $(D !is)) are permitted between all pointers, without restriction. ) @@ -3668,7 +3667,7 @@ void main() ) $(P The above restrictions apply only to expressions which are - actually executed. For example: + actually evaluated. For example: ) --- static int y = 0; @@ -3703,7 +3702,7 @@ static assert(countTen(12) == 12); // invalid, modifies y. $(IMPLEMENTATION_DEFINED Functions executed via CTFE can give different results - from run time when implementation-defined occurs. + from run time when implementation-defined behavior occurs. )