From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BC7FD388A814; Wed, 13 May 2020 09:18:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC7FD388A814 From: "maennich at android dot com" To: libabigail@sourceware.org Subject: [Bug default/25982] New: clang build: address -Woverloaded-virtual Date: Wed, 13 May 2020 09:18:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: maennich at android dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dodji at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2020 09:18:15 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25982 Bug ID: 25982 Summary: clang build: address -Woverloaded-virtual Product: libabigail Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: default Assignee: dodji at redhat dot com Reporter: maennich at android dot com CC: libabigail at sourceware dot org Target Milestone: --- When compiling with clang, the warning 'overloaded-virtual' is emitted in s= ome locations. Sample: In file included from abg-ir.cc:41: include/abg-ir.h:361:3: warning: 'abigail::ir::ir_traversable_base::travers= e' hides overloaded virtual function [-Woverloaded-virtual] traverse(ir_node_visitor& v); ^ include/abg-traverse.h:95:16: note: hidden overloaded virtual function 'abigail::ir::traversable_base::traverse' declared here: type mismatch at 1= st parameter ('abigail::ir::node_visitor_base &' vs 'abigail::ir::ir_node_visi= tor &') virtual bool traverse(node_visitor_base& v); ^ In file included from abg-ir.cc:41: include/abg-ir.h:696:3: warning: 'abigail::ir::translation_unit::traverse' hides overloaded virtual function [-Woverloaded-virtual] traverse(ir_node_visitor& v); ^ include/abg-traverse.h:95:16: note: hidden overloaded virtual function 'abigail::ir::traversable_base::traverse' declared here: type mismatch at 1= st parameter ('abigail::ir::node_visitor_base &' vs 'abigail::ir::ir_node_visi= tor &') virtual bool traverse(node_visitor_base& v); ^ In file included from abg-ir.cc:41: include/abg-ir.h:3734:3: warning: 'abigail::ir::class_or_union::insert_member_decl' hides overloaded virtual function [-Woverloaded-virtual] insert_member_decl(decl_base_sptr member, declarations::iterator before); ^ include/abg-ir.h:1664:3: note: hidden overloaded virtual function 'abigail::ir::scope_decl::insert_member_decl' declared here: type mismatch = at 1st parameter ('const abigail::ir::decl_base_sptr &' (aka 'const shared_ptr &') vs 'abigail::ir::decl_base_sptr' (aka 'shared_ptr')) insert_member_decl(const decl_base_sptr& member, ^ Commit e5e8cb95434e ("configure: set -Wno-error-overloaded-virtual for clang builds") addresses this in the code by demoting the warning to not be an er= ror. But we should check whether the compiler actually has a point with this. Dodji thinks (https://sourceware.org/pipermail/libabigail/2020q2/002217.htm= l),=20 "I am not even sure that warning needs fixing because we intentionally use virtual operator overloading for comparison operators in the design of the IR." --=20 You are receiving this mail because: You are on the CC list for the bug.=