Skip to content

Commit 2e9c181

Browse files
authored
Ban UB at CTFE
1 parent 6ce897d commit 2e9c181

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
@@ -3595,6 +3595,8 @@ void main()
35953595
Casts between signed and unsigned types are permitted.)
35963596

35973597
$(LI Reinterpretation of overlapped fields in a union is not permitted.)
3598+
3599+
$(LI Undefined behavior must not occur.)
35983600
)
35993601

36003602
$(P Pointers are permitted in CTFE, provided they are used safely:)
@@ -3681,7 +3683,7 @@ static assert(countTen(12) == 12); // invalid, modifies y.
36813683

36823684
$(IMPLEMENTATION_DEFINED
36833685
Functions executed via CTFE can give different results
3684-
from run time when implementation-defined or undefined-behavior occurs.
3686+
from run time when implementation-defined occurs.
36853687
)
36863688

36873689

0 commit comments

Comments
 (0)