Skip to content

Commit b0a5182

Browse files
committed
Support OpenBSD's __assert2 and NetBSD's __assert13
This has the same usage as __assert_func in newlib. See https://github.com/openbsd/src/blob/master/include/assert.h.
1 parent 64a1ed0 commit b0a5182

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/goto-programs/builtin_functions.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1221,9 +1221,13 @@ void goto_convertt::do_function_call_symbol(
12211221
dest.add(goto_programt::make_assertion(false_exprt(), annotated_location));
12221222
// we ignore any LHS
12231223
}
1224-
else if(identifier=="__assert_func")
1224+
else if(
1225+
identifier == "__assert_func" || identifier == "__assert2" ||
1226+
identifier == "__assert13")
12251227
{
12261228
// __assert_func is newlib (used by, e.g., cygwin)
1229+
// __assert2 is OpenBSD
1230+
// __assert13 is NetBSD
12271231
// These take four arguments:
12281232
// "file.c", line, __func__, "expression"
12291233
if(arguments.size()!=4)

0 commit comments

Comments
 (0)