public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: "woodard at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/21486] missing const when comparing C++ object files
Date: Sun, 01 Jan 2017 00:00:00 -0000	[thread overview]
Message-ID: <bug-21486-9487-mrQA4AtKKZ@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-21486-9487@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=21486

--- 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.

  parent reply	other threads:[~2017-05-12  2:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-01  0:00 [Bug default/21486] New: " woodard at redhat dot com
2017-01-01  0:00 ` [Bug default/21486] top-level const qualifiers on types of function parameters are not ignored dodji at redhat dot com
2017-01-01  0:00 ` [Bug default/21486] missing const when comparing C++ object files dodji at redhat dot com
2017-01-01  0:00 ` dodji at redhat dot com
2017-01-01  0:00 ` woodard at redhat dot com
2017-01-01  0:00 ` woodard at redhat dot com
2017-01-01  0:00 ` [Bug default/21486] top-level const qualifiers on types of function parameters are not ignored dodji at redhat dot com
2017-01-01  0:00 ` [Bug default/21486] missing const when comparing C++ object files woodard at redhat dot com
2017-01-01  0:00 ` dodji at seketeli dot org
2017-01-01  0:00 ` woodard at redhat dot com
2017-01-01  0:00 ` woodard at redhat dot com [this message]
2017-01-01  0:00 ` [Bug default/21486] New: " Dodji Seketeli
2017-01-01  0:00 ` [Bug default/21486] top-level const qualifiers on types of function parameters are not ignored dodji at redhat dot com
2017-01-01  0:00 ` woodard at redhat dot com
2017-01-01  0:00 ` dodji at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-21486-9487-mrQA4AtKKZ@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=libabigail@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).