This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions (v4)


On Wed, Sep 19, 2018 at 11:10 AM, Marek Polacek <polacek@redhat.com> wrote:
> On Wed, Sep 19, 2018 at 05:07:34PM +0200, Andreas Schwab wrote:
>> On Sep 19 2018, Marek Polacek <polacek@redhat.com> wrote:
>>
>> > 2018-09-19  Marek Polacek  <polacek@redhat.com>
>> >
>> >     * class.c (build_vtbl_initializer): Don't mess with *inits for
>> >     TARGET_VTABLE_USES_DESCRIPTORS.
>> >
>> > diff --git gcc/cp/class.c gcc/cp/class.c
>> > index 9ca46441871..0239f6ae045 100644
>> > --- gcc/cp/class.c
>> > +++ gcc/cp/class.c
>> > @@ -9370,7 +9370,7 @@ build_vtbl_initializer (tree binfo,
>> >       int i;
>> >       if (init == size_zero_node)
>> >         for (i = 0; i < TARGET_VTABLE_USES_DESCRIPTORS; ++i)
>> > -         CONSTRUCTOR_APPEND_ELT (*inits, idx, init);
>> > +         CONSTRUCTOR_APPEND_ELT (*inits, NULL_TREE, init);
>> >       else
>> >         for (i = 0; i < TARGET_VTABLE_USES_DESCRIPTORS; ++i)
>> >           {
>> > @@ -9378,7 +9378,7 @@ build_vtbl_initializer (tree binfo,
>> >                                  fn, build_int_cst (NULL_TREE, i));
>> >             TREE_CONSTANT (fdesc) = 1;
>> >
>> > -           CONSTRUCTOR_APPEND_ELT (*inits, idx, fdesc);
>> > +           CONSTRUCTOR_APPEND_ELT (*inits, NULL_TREE, fdesc);
>> >           }
>> >     }
>> >        else
>>
>> Thanks, that works.
>
> Great.  Jason, can I commit it then?

Andreas, do the new testcases pass?  That would surprise me, but OK if so.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]