Skip to content

Commit 8442a84

Browse files
[defns.undefined] Fix the note on UB in constant evaluation
Currently, the `assmue` and `noreturn` attributes are allowed to bring undefined behavior into constant evaluation. There might be more such standard attributes in the future.
1 parent c92bc38 commit 8442a84

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/intro.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,8 @@
644644
issuance of a diagnostic message). Many incorrect program constructs do
645645
not engender undefined behavior; they are required to be diagnosed.
646646
Evaluation of a constant expression\iref{expr.const} never exhibits behavior explicitly
647-
specified as undefined in \ref{intro} through \ref{cpp}.
647+
specified as undefined in \ref{intro} through \ref{cpp}
648+
except for violation of semantic restrictions of standard attributes\iref{dcl.attr}.
648649
\end{defnote}
649650

650651
\indexdefn{behavior!unspecified}%

0 commit comments

Comments
 (0)