Skip to content

Commit 0970943

Browse files
authored
Merge pull request #4167 from Bolpat/patch-1
Ban undefined behavior at CTFE
2 parents 0c5d18b + 2e9c181 commit 0970943

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/function.dd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3596,6 +3596,8 @@ void main()
35963596
Casts between signed and unsigned types are permitted.)
35973597

35983598
$(LI Reinterpretation of overlapped fields in a union is not permitted.)
3599+
3600+
$(LI Undefined behavior must not occur.)
35993601
)
36003602

36013603
$(P Pointers are permitted in CTFE, provided they are used safely:)
@@ -3682,7 +3684,7 @@ static assert(countTen(12) == 12); // invalid, modifies y.
36823684

36833685
$(IMPLEMENTATION_DEFINED
36843686
Functions executed via CTFE can give different results
3685-
from run time when implementation-defined or undefined-behavior occurs.
3687+
from run time when implementation-defined occurs.
36863688
)
36873689

36883690

0 commit comments

Comments
 (0)