r/C_Programming • u/8d8n4mbo28026ulk • Aug 26 '26
Reliability Lessons From SQLite - Richard Hipp | SSW 2026
https://www.youtube.com/watch?v=V_qzqY1bb7I
39
Upvotes
r/C_Programming • u/8d8n4mbo28026ulk • Aug 26 '26
View all comments
Show parent comment
2
u/thradams Aug 26 '26
I use 'assert' to indicate a bug if the assertion fails. However, even if it is a bug, sometimes I handle the (assert) bug as an expected error, even though it is not actually expected.
I have paths in the code that should not be taken.. then the assert(false).
The problem I have is how to tell static analysis what to do with assert: should it assume that the condition is true or not?
This assumption works in debug builds but not in release builds?. Should we keep the assumption in release builds as well?