Skip to content

Commit e8505bd

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/goto-programs/builtin_functions.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,9 +1221,10 @@ 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(identifier == "__assert_func" || identifier == "__assert2")
12251225
{
12261226
// __assert_func is newlib (used by, e.g., cygwin)
1227+
// __assert2 is OpenBSD
12271228
// These take four arguments:
12281229
// "file.c", line, __func__, "expression"
12291230
if(arguments.size()!=4)

0 commit comments

Comments
 (0)