Skip to content

Commit e0516ba

Browse files
committed
Follow all tags (and symbol types), better warning message
1 parent c56ae13 commit e0516ba

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/linking/linking.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,8 @@ void linkingt::duplicate_code_symbol(
598598

599599
while(!conflicts.empty())
600600
{
601-
const typet &t1=ns.follow(conflicts.front().first);
602-
const typet &t2=ns.follow(conflicts.front().second);
601+
const typet &t1=follow_tags_symbols(ns, conflicts.front().first);
602+
const typet &t2=follow_tags_symbols(ns, conflicts.front().second);
603603

604604
// void vs. non-void return type may be acceptable if the
605605
// return value is never used
@@ -626,7 +626,8 @@ void linkingt::duplicate_code_symbol(
626626
old_symbol.value.is_nil()!=new_symbol.value.is_nil())
627627
{
628628
if(warn_msg.empty())
629-
warn_msg="different pointer types in function";
629+
warn_msg="pointer parameter types differ between "
630+
"declaration and definition";
630631
replace=new_symbol.value.is_not_nil();
631632
}
632633
// transparent union with (or entirely without) implementation is
@@ -812,7 +813,7 @@ void linkingt::duplicate_object_symbol(
812813
if(old_type.id()==ID_struct ||
813814
old_type.id()==ID_union ||
814815
old_type.id()==ID_array ||
815-
old_type.id()==ID_c_enum_tag)
816+
old_type.id()==ID_c_enum)
816817
detailed_conflict_report(
817818
old_symbol,
818819
new_symbol,

0 commit comments

Comments
 (0)