[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug default/21492] string comparison of class name from DWARF leads to false ABI incompatibility report
https://sourceware.org/bugzilla/show_bug.cgi?id=21492
Jonathan Wakely <jwakely.gcc at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jwakely.gcc at gmail dot com
--- Comment #1 from Jonathan Wakely <jwakely.gcc at gmail dot com> ---
Both gcc and clang emit an DW_AT_type with the template argument value, so
another way to check for mismatches would be to compare those tags as well as
the names.
This might also help with cases where the strings in the debuginfo are the same
but actually the types are not:
template<auto N> struct X { };
enum E : int { };
void f(X<(E)1>) { }
void f(X<1>) { }
Clang shows these arguments with the same DW_AT_name, X<1>, but they're
distinct types:
<4c> DW_AT_linkage_name: (indirect string, offset: 0x33): _Z1f1XIL1E1EE
<70> DW_AT_linkage_name: (indirect string, offset: 0x43): _Z1f1XILi1EE
<86> DW_AT_name : (indirect string, offset: 0x52): X<1>
<99> DW_AT_name : (indirect string, offset: 0x52): X<1>
--
You are receiving this mail because:
You are on the CC list for the bug.