From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Matthias Klose <doko@ubuntu.com>,
Jason Merrill <jason@redhat.com>,
gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: C++ PATCH for c++/54325 (wrong error initializing abstract base class)
Date: Fri, 07 Dec 2012 13:43:00 -0000 [thread overview]
Message-ID: <CAAiZkiAx+R1nhSYX4zhfQ_sGUT9C1bpHLEN-ireMvdPz-5RYuw@mail.gmail.com> (raw)
In-Reply-To: <20121207133901.GW2315@tucnak.redhat.com>
On Fri, Dec 7, 2012 at 7:39 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Dec 07, 2012 at 07:34:30AM -0600, Gabriel Dos Reis wrote:
>> On Fri, Dec 7, 2012 at 3:13 AM, Matthias Klose <doko@ubuntu.com> wrote:
>> > Am 07.12.2012 06:05, schrieb Jason Merrill:
>> >> It's perfectly OK to initialize a base class of abstract type; it's only an
>> >> error to create a full object of such a type. So this patch moves the check
>> >> from more generic initialization code out into a function that's definitely
>> >> creating a new object.
>> >>
>> >> Tested x86_64-pc-linux-gnu, applying to trunk and 4.7.
>> >
>> > this doesn't build on the branch:
>> >
>> > ../gcc/cp/tree.c: In function 'build_aggr_init_expr':
>> > ../gcc/cp/tree.c:399:1: error: parameter name omitted
>> >
>> > this fixes the bootstrap, currently running the testsuite.
>> >
>> > --- cp/tree.c~ 2012-12-07 10:01:16.665415647 +0100
>> > +++ cp/tree.c 2012-12-07 10:11:01.373410862 +0100
>> > @@ -396,7 +396,8 @@
>> > callable. */
>> >
>> > tree
>> > -build_aggr_init_expr (tree type, tree init, tsubst_flags_t /*complain*/)
>> > +build_aggr_init_expr (tree type, tree init,
>> > + tsubst_flags_t complain ATTRIBUTE_UNUSED)
>> > {
>> > tree fn;
>> > tree slot;
>> >
>>
>> We should definitely teach the compiler to accept the former and not
>> be silly in requiring the latter when C++.
>
> Except that GCC 4.7 doesn't mandate building with C++, so the sources must
> be valid C.
>
> Jakub
Right you are!
Thanks,
-- Gaby
next prev parent reply other threads:[~2012-12-07 13:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-07 5:05 Jason Merrill
2012-12-07 9:13 ` Matthias Klose
2012-12-07 9:17 ` Jakub Jelinek
2012-12-07 9:24 ` Matthias Klose
2012-12-07 10:10 ` Paolo Carlini
2012-12-07 14:41 ` Jason Merrill
2012-12-07 13:34 ` Gabriel Dos Reis
2012-12-07 13:39 ` Jakub Jelinek
2012-12-07 13:43 ` Gabriel Dos Reis [this message]
2012-12-21 11:38 ` Paolo Carlini
2012-12-22 20:30 ` Jason Merrill
2012-12-22 23:02 ` Paolo Carlini
2012-12-24 4:56 ` Jason Merrill
2012-12-24 8:29 ` Paolo Carlini
2012-12-24 9:27 ` Paolo Carlini
2012-12-26 18:58 ` Jason Merrill
2013-01-02 20:56 ` Jason Merrill
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAiZkiAx+R1nhSYX4zhfQ_sGUT9C1bpHLEN-ireMvdPz-5RYuw@mail.gmail.com \
--to=gdr@integrable-solutions.net \
--cc=doko@ubuntu.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=jason@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).