public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65845] typeid doesn't work consistently on pure virtual classes
       [not found] <bug-65845-4@http.gcc.gnu.org/bugzilla/>
@ 2015-04-22 13:20 ` redi at gcc dot gnu.org
  2021-08-27 19:07 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-22 13:20 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The expression typeid(Interface()) is the type of a function that returns
Interface, but such a function cannot exist because the type is abstract.

I don't know why typeid(Vector<Interface>) needs to instantiate the default
argument.


The output from trunk is:

t.cc: In function ‘int main()’:
t.cc:20:20: error: ‘type name’ declared as function returning an abstract class
type
   typeid(Interface()).name(); //GCC 4.9.2 and VS2013: doesn't compile
                    ^
t.cc: In instantiation of ‘class Vector<Interface>’:
t.cc:38:1:   required from here
t.cc:11:8: error: cannot allocate an object of abstract type ‘Interface’
   void resize(unsigned n, T val = T()); //C++03 style resize
        ^
t.cc:3:7: note:   because the following virtual functions are pure within
‘Interface’:
 class Interface {
       ^
t.cc:5:15: note:        virtual int Interface::size() const
   virtual int size() const = 0;
               ^
>From gcc-bugs-return-484350-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 22 13:23:05 2015
Return-Path: <gcc-bugs-return-484350-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 106811 invoked by alias); 22 Apr 2015 13:23:05 -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 106243 invoked by uid 48); 22 Apr 2015 13:23:02 -0000
From: "law at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/64916] ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression
Date: Wed, 22 Apr 2015 13:23:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: law at redhat dot com
X-Bugzilla-Status: RESOLVED
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:
Message-ID: <bug-64916-4-xgeG4AALrt@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64916-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64916-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: 2015-04/txt/msg01902.txt.bz2
Content-length: 318

https://gcc.gnu.org/bugzilla/show_bug.cgi?idd916

--- Comment #8 from Jeffrey A. Law <law at redhat dot com> ---
Alex, you're right.  It's just an artifact which patch I pulled out of my todo
list.  Your patches are effectively doing the same thing.  If you'd like I can
add you to the ChangeLog entry for the fix.


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

* [Bug c++/65845] typeid doesn't work consistently on pure virtual classes
       [not found] <bug-65845-4@http.gcc.gnu.org/bugzilla/>
  2015-04-22 13:20 ` [Bug c++/65845] typeid doesn't work consistently on pure virtual classes redi at gcc dot gnu.org
@ 2021-08-27 19:07 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-27 19:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=86252

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed for GCC 11 by r11-5036 aka PR 86252

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-65845-4@http.gcc.gnu.org/bugzilla/>
2015-04-22 13:20 ` [Bug c++/65845] typeid doesn't work consistently on pure virtual classes redi at gcc dot gnu.org
2021-08-27 19:07 ` 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).