public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59074] New: incorrect "call of overloaded .. is ambiguous" error when changing base class to virtual
@ 2013-11-10 22:32 cpp@tempest-sw.com
  2021-08-09 19:42 ` [Bug c++/59074] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: cpp@tempest-sw.com @ 2013-11-10 22:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59074

            Bug ID: 59074
           Summary: incorrect "call of overloaded .. is ambiguous" error
                    when changing base class to virtual
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cpp@tempest-sw.com

Created attachment 31191
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31191&action=edit
compile to demonstrate problem

$ g++-4.8 -fsyntax-only -std=c++11 gccbug.cpp
gccbug.cpp: In constructor ‘derived::derived(const string&)’:
gccbug.cpp:21:15: error: call of overloaded ‘base2(<brace-enclosed initializer
list>)’ is ambiguous
    : base2{str}
               ^
gccbug.cpp:21:15: note: candidates are:
gccbug.cpp:15:4: note: base2::base2(const string&)
    base2(string const&) {}
    ^
gccbug.cpp:13:7: note: base2::base2(const base2&)
 class base2 : virtual public base1 {
       ^
gccbug.cpp:13:7: note: base2::base2(base2&&)
$ 


Remove the "virtual" keyword, and the example passes syntax check without any
error messages.

Clang 3.3 accepts original and edited version without any error messages.

I thought this might be related to #58052, but the fact that removing the
virtual base class eliminates the problem convinced me that it must be
something different.


gcc 4.8.2 on OpenSUSE 12.3 (downloaded as version 4.8.2+r203692-61.1 from the
OpenSUSE devel:gcc repository)

$ gcc --version
gcc-4.8 (SUSE Linux) 4.8.2 20131016 [gcc-4_8-branch revision 203692]
Copyright (C) 2013 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.
>From gcc-bugs-return-434232-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Nov 10 23:11:19 2013
Return-Path: <gcc-bugs-return-434232-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29514 invoked by alias); 10 Nov 2013 23:11:19 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 29489 invoked by uid 48); 10 Nov 2013 23:11:14 -0000
From: "altimin at altimin dot ru" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/59075] New: python pretty printer does not work at OS X
Date: Sun, 10 Nov 2013 23:11:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 4.6.4
X-Bugzilla-Keywords:
X-Bugzilla-Severity: trivial
X-Bugzilla-Who: altimin at altimin dot ru
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
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
Message-ID: <bug-59075-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg01009.txt.bz2
Content-length: 695

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY075

            Bug ID: 59075
           Summary: python pretty printer does not work at OS X
           Product: gcc
           Version: 4.6.4
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: altimin at altimin dot ru

Python pretty printing does not work at Mac OS X 10.9 (g++ 4.6.4, gdb 7.6)
because result of get_basic_type() is just 'vector' instead of 'std::vector'.

Adding following two lines to add_version method of Printer class worked for
me.

if base == 'std::':
            self.add(name, function)


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

* [Bug c++/59074] incorrect "call of overloaded .. is ambiguous" error when changing base class to virtual
  2013-11-10 22:32 [Bug c++/59074] New: incorrect "call of overloaded .. is ambiguous" error when changing base class to virtual cpp@tempest-sw.com
@ 2021-08-09 19:42 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-09 19:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59074

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.0
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in 4.9.0

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

end of thread, other threads:[~2021-08-09 19:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-10 22:32 [Bug c++/59074] New: incorrect "call of overloaded .. is ambiguous" error when changing base class to virtual cpp@tempest-sw.com
2021-08-09 19:42 ` [Bug c++/59074] " pinskia at gcc dot gnu.org

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