Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions spec/function.dd
Original file line number Diff line number Diff line change
Expand Up @@ -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.)

Expand Down Expand Up @@ -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.
)

Expand All @@ -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;
Expand Down Expand Up @@ -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.
)


Expand Down