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

--- Comment #9 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Fri Oct 14 15:37:54 2016
New Revision: 241168

URL: https://gcc.gnu.org/viewcvs?rev=241168&root=gcc&view=rev
Log:
PR c++/71912 - [6/7 regression] flexible array in struct in union rejected

gcc/cp/ChangeLog:
        * class.c (struct flexmems_t):  Add members.
        (find_flexarrays): Add arguments.  Correct handling of anonymous
        structs.
        (diagnose_flexarrays): Adjust to issue warnings in addition to errors.
        (check_flexarrays): Add argument.
        (diagnose_invalid_flexarray): New functions.

gcc/testsuite/ChangeLog:
        * g++.dg/ext/flexary4.C: Adjust.
        * g++.dg/ext/flexary5.C: Same.
        * g++.dg/ext/flexary9.C: Same.
        * g++.dg/ext/flexary19.C: New test.
        * g++.dg/ext/flexary18.C: New test.
        * g++.dg/torture/pr64312.C: Add a dg-error directive to an ill-formed
        regression test.
        * g++.dg/compat/struct-layout-1_generate.c (subfield): Add argument.
        Avoid generating a flexible array member in an array.


Modified:
    branches/gcc-6-branch/gcc/cp/ChangeLog
    branches/gcc-6-branch/gcc/cp/class.c
    branches/gcc-6-branch/gcc/testsuite/ChangeLog
   
branches/gcc-6-branch/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
    branches/gcc-6-branch/gcc/testsuite/g++.dg/ext/flexary4.C
    branches/gcc-6-branch/gcc/testsuite/g++.dg/ext/flexary5.C
    branches/gcc-6-branch/gcc/testsuite/g++.dg/ext/flexary9.C
    branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/pr64312.C

Reply via email to