File tree 2 files changed +6
-6
lines changed 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -728,8 +728,9 @@ void goto_convertt::do_function_call_symbol(
728
728
a->source_location =function.source_location ();
729
729
a->source_location .set (" user-provided" , true );
730
730
}
731
- else if (identifier==" assert" &&
732
- !ns.lookup (identifier).location .get_function ().empty ())
731
+ else if (
732
+ identifier == " assert" && symbol->type .get_bool (ID_C_incomplete) &&
733
+ to_code_type (symbol->type ).return_type () == signed_int_type ())
733
734
{
734
735
if (arguments.size ()!=1 )
735
736
{
Original file line number Diff line number Diff line change @@ -461,8 +461,7 @@ void linkingt::duplicate_code_symbol(
461
461
// return type are an error as we would end up with assignments with
462
462
// mismatching types; as we currently do not patch these by inserting type
463
463
// casts we need to fail hard
464
- if (!old_symbol.location .get_function ().empty () &&
465
- old_symbol.value .is_nil ())
464
+ if (old_symbol.type .get_bool (ID_C_incomplete) && old_symbol.value .is_nil ())
466
465
{
467
466
if (base_type_eq (old_t .return_type (), new_t .return_type (), ns))
468
467
link_warning (
@@ -479,8 +478,8 @@ void linkingt::duplicate_code_symbol(
479
478
old_symbol.location =new_symbol.location ;
480
479
old_symbol.is_weak =new_symbol.is_weak ;
481
480
}
482
- else if (!new_symbol. location . get_function (). empty () &&
483
- new_symbol.value .is_nil ())
481
+ else if (
482
+ new_symbol. type . get_bool (ID_C_incomplete) && new_symbol.value .is_nil ())
484
483
{
485
484
if (base_type_eq (old_t .return_type (), new_t .return_type (), ns))
486
485
link_warning (
You can’t perform that action at this time.
0 commit comments