Clarify assertion semantics, SIMICS-23401#415
Conversation
|
PR Verification: ✅ success |
doc/1.4/language.md
Outdated
|
|
||
| > [!NOTE] | ||
| > | ||
| > Unlike standard assertions in C/C++, DML guarantees that the assertion |
There was a problem hiding this comment.
Now that I think about it, this could be a source of confusion in of itself, because I don't think the Simics API's family of assert macros like ASSERT, FATAL_ERROR_IF, etc. can get optimized out. In particular, both ASSERT and FATAL_ERROR unconditionally resolves to assert_error and fatal_error respectively, whose definitions get linked in so they can't be studied by the compiler, and their signatures are annotated only as noreturn which does not signify "it's undefined behavior to call this function" so GCC can't elide the call.
Hence, this comment can only concern the C standard library's assert.h's assert. It's worth clarifying this:
Unlike
assertoffered by the C/C++ standard library, and like theASSERTfamily of macros offered by the Simics API, DML guarantees...
4c98169 to
9d320d1
Compare
|
PR Verification: ✅ success |
No description provided.