public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59885] New: compiler issues incorrect "ambiguous base class" error message
@ 2014-01-20  9:27 burrows.labs at gmail dot com
  0 siblings, 0 replies; only message in thread
From: burrows.labs at gmail dot com @ 2014-01-20  9:27 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59885
           Summary: compiler issues incorrect "ambiguous base class" error
                    message
           Product: gcc
           Version: 4.7.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burrows.labs at gmail dot com

The following code produces an error message that I believe to have swapped the
'base' and 'derived' class.


#include <iostream>

template <typename... Whatever>
class A;

template <typename Type>
class A<Type> {};

template <typename Type, typename Head, typename... Tail>
class A<Type, Head, Tail...> : A<Type, Tail...> {};

class B : public A<int, int, double> {};

template <typename Type, typename... Unused>
void f(A<Type, Unused...> *ref)
{
    std::cout << "f.a" << std::endl;
}

int
main()
{
    B *b = new B;
    f(b);

    return 0;
}

// eof

$ g++-4.7 -std=c++0x -pedantic -Wall in.cpp -o in
in.cpp: In function ‘int main()’:
in.cpp:24:8: error: no matching function for call to ‘f(B*&)’
in.cpp:24:8: note: candidate is:
in.cpp:15:6: note: template<class Type, class ... Unused> void f(A<Type, Unused
...>*)
in.cpp:15:6: note:   template argument deduction/substitution failed:
in.cpp:24:8: note:   ‘B’ is an ambiguous base class of ‘A<Type, Unused ...>’
>From gcc-bugs-return-440974-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jan 20 09:28:29 2014
Return-Path: <gcc-bugs-return-440974-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 17766 invoked by alias); 20 Jan 2014 09:28:29 -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 17740 invoked by uid 48); 20 Jan 2014 09:28:25 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/59878] [4.9 Regression] ISL from cloog does not work with trunk
Date: Mon, 20 Jan 2014 09:28:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: bootstrap
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: target_milestone
Message-ID: <bug-59878-4-Ch2T9vc4xr@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59878-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59878-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: 2014-01/txt/msg02116.txt.bz2
Content-length: 446

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.0

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I'd say it's a bug in cloog.  Or a bug in our documentation which could be
clearer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-20  9:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-20  9:27 [Bug c++/59885] New: compiler issues incorrect "ambiguous base class" error message burrows.labs at gmail dot com

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