From 9d320d113a4362a3457835b9801443ff90ce8b37 Mon Sep 17 00:00:00 2001 From: Erik Carstensen Date: Mon, 16 Feb 2026 16:10:03 +0100 Subject: [PATCH] Clarify assertion semantics, SIMICS-23401 --- doc/1.4/language.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/1.4/language.md b/doc/1.4/language.md index 31039c43..edada7c0 100644 --- a/doc/1.4/language.md +++ b/doc/1.4/language.md @@ -3923,9 +3923,16 @@ assert expr; Evaluates *`expr`*. If the result is `true`, the -statement has no effect; otherwise, a runtime-error is generated. +statement has no effect; otherwise, a fatal runtime error is generated, aborting the current execution thread. *`expr`* must have type `bool`. +> [!NOTE] +> +> DML guarantees that the assertion expression is evaluated, and that the +> program terminates if the expression is false. This differs from the `assert` +> construct in the C/C++ standard libraries, which can sometimes be optimized +> out depending on build settings. + ### Error Statements