This is the mail archive of the gcc-bugs@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]

[Bug c++/70347] [5/6 Regression] default member initializer not picked up by union


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

--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Author: ppalka
Date: Wed Mar 23 21:08:32 2016
New Revision: 234443

URL: https://gcc.gnu.org/viewcvs?rev=234443&root=gcc&view=rev
Log:
Fix PR c++/70347 (default member initializer not picked up by union)

gcc/cp/ChangeLog:

        PR c++/70347
        * typeck.c (process_init_constructor_union): If the initializer
        is empty, use the union's NSDMI if it has one.

gcc/testsuite/ChangeLog:

        PR c++/70347
        * g++.dg/cpp1y/nsdmi-union1.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/nsdmi-union1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck2.c
    trunk/gcc/testsuite/ChangeLog

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