Skip to content

Commit dbb992a

Browse files
authored
Improve CTFE section (#4247)
1 parent 5fc9238 commit dbb992a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

spec/function.dd

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3600,17 +3600,16 @@ void main()
36003600
---
36013601
)
36023602

3603-
$(P The function must have a $(GLINK SpecifiedFunctionBody).)
3603+
$(P The function must have a $(GLINK FunctionBody).)
36043604

36053605
$(P CTFE is subject to the following restrictions:)
36063606

36073607
$(OL
3608-
$(LI Expressions may not reference any global or local
3609-
static variables.)
3608+
$(LI Expressions may not reference any mutable static variables.)
36103609

36113610
$(LI $(DDSUBLINK spec/iasm, asmstatements, AsmStatements) are not permitted)
36123611

3613-
$(LI Non-portable casts (eg, from $(D int[]) to $(D float[])), including
3612+
$(LI Non-portable casts (e.g., from $(D int[]) to $(D float[])), including
36143613
casts which depend on endianness, are not permitted.
36153614
Casts between signed and unsigned types are permitted.)
36163615

@@ -3656,7 +3655,7 @@ void main()
36563655
)
36573656

36583657
$(LI
3659-
Equality comparisons (==, !=, $(D_KEYWORD is), $(D_KEYWORD !is)) are
3658+
Equality comparisons ($(D ==), $(D !=), $(D is), $(D !is)) are
36603659
permitted between all pointers, without restriction.
36613660
)
36623661

@@ -3668,7 +3667,7 @@ void main()
36683667
)
36693668

36703669
$(P The above restrictions apply only to expressions which are
3671-
actually executed. For example:
3670+
actually evaluated. For example:
36723671
)
36733672
---
36743673
static int y = 0;
@@ -3703,7 +3702,7 @@ static assert(countTen(12) == 12); // invalid, modifies y.
37033702

37043703
$(IMPLEMENTATION_DEFINED
37053704
Functions executed via CTFE can give different results
3706-
from run time when implementation-defined occurs.
3705+
from run time when implementation-defined behavior occurs.
37073706
)
37083707

37093708

0 commit comments

Comments
 (0)