[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug default/21486] missing const when comparing C++ object files


--- Comment #4 from Ben Woodard <woodard at redhat dot com> ---
The problem with libabigail is that it drops the "const" which is an ABI
artifact in both objects. 

It is not clear to me that clang's statement that the type is typedef'd is in
fact an artifact. That could be a problem with clang. I'm not sure.

The second problem with parameter 3 may be a GCC problem:
 [ 41147]      subprogram
               external             (flag_present) yes
               name                 (strp) "dump"
               decl_file            (data1) 2
               decl_line            (data2) 4069
               linkage_name         (strp)
"abigail::dump(abigail::ir::translation_unit const&, std::basic_ostream<char,
std::char_traits<char> >&, bool)"
               declaration          (flag_present) yes
               sibling              (ref4) [ 41167]
 [ 41157]        formal_parameter
                 type                 (ref4) [ 6b4b9]
 [ 4115c]        formal_parameter
                 type                 (ref4) [ 42e87]
 [ 41161]        formal_parameter
                 type                 (ref4) [ 3c1a1]

 [ 3c1a1]    base_type
             byte_size            (data1) 1
             encoding             (data1) boolean (2)
             name                 (strp) "bool"

To me this looks like it should be 3c1a9 which is:
 [ 3c1a9]    const_type
             type                 (ref4) [ 3c1a1]

If you agree then I will submit a gcc PR regarding that.

Clang seems to get this correct:

 [ 6a5cd]        formal_parameter
                 location             (sec_offset) location list [ 1118f]
                 name                 (strp) "annotate"
                 decl_file            (data1) 36
                 decl_line            (data2) 4091
                 type                 (ref4) [ 6ad8e]

 [ 6ad8e]    const_type
             type                 (ref4) [ 2064a]
 [ 2064a]    base_type
             name                 (strp) "bool"
             encoding             (data1) boolean (2)
             byte_size            (data1) 1

You are receiving this mail because:
You are on the CC list for the bug.