public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/21486] New: missing const when comparing C++ object files
@ 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
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: woodard at redhat dot com @ 2017-01-01  0:00 UTC (permalink / raw)
  To: libabigail

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

            Bug ID: 21486
           Summary: missing const when comparing C++ object files
           Product: libabigail
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: woodard at redhat dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

Doing some introspection on libabigail itself with different compilers it flags
this error:

  [C]'function void abigail::dump(abigail::ir::translation_unit_sptr,
std::ostream&, bool)' at abg-writer.cc:4091:1 has some indirect sub-type
changes:
    parameter 1 of type 'typedef abigail::ir::translation_unit_sptr' changed:
      entity changed from 'typedef abigail::ir::translation_unit_sptr' to
'const abigail::ir::translation_unit_sptr'
      type size hasn't changed
    parameter 3 of type 'bool' changed:
      entity changed from 'bool' to 'const bool'
      type size hasn't changed

[ben@localhost build]$ g++ --version
g++ (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[ben@localhost build]$ clang++ --version
clang version 3.9.1 (tags/RELEASE_391/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

The function definition does seem to have a const:
void
dump(const translation_unit_sptr t, std::ostream& o, const bool annotate)
{
  if (t)
    dump(*t, o, annotate);
}


digging through the readelf output it looks like it is a libabigail bug:

GCC's debug-info looks correct:
 [ 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]

 [ 6b4b9]    reference_type
             byte_size            (data1) 8
             type                 (ref4) [ 3d90e]
 [ 3d90e]        const_type
                 type                 (ref4) [ 3d7dd]
 [ 3d7dd]        class_type
                 name                 (strp) "translation_unit"
                 declaration          (flag_present) yes
                 sibling              (ref4) [ 3d90e]

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-07-05 10:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-01  0:00 [Bug default/21486] New: missing const when comparing C++ object files 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 ` woodard at redhat dot com
2017-01-01  0:00 ` 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 ` [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 ` woodard at redhat dot com
2017-01-01  0:00 ` dodji at redhat dot com
2017-01-01  0:00 ` [Bug default/21486] top-level const qualifiers on types of function parameters are not ignored woodard at redhat dot com
2017-01-01  0:00 ` dodji at redhat dot com
2017-01-01  0:00 ` dodji at redhat dot com
2017-01-01  0:00 ` [Bug default/21486] New: missing const when comparing C++ object files Dodji Seketeli

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