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

Reply via email to