On Tue, Feb 02, 2016 at 06:21:04PM -0700, Martin Sebor wrote: > gcc/cp/ChangeLog: > 2016-02-02 Martin Sebor <mse...@redhat.com> > > PR c++/69251 > PR c++/69253 > PR c++/69290 > PR c++/69277 > PR c++/69349 > * class.c (walk_subobject_offsets): Avoid testing the upper bound > of a flexible array member for equality to null. > (find_flexarrays): Remove spurious whitespace introduced in r231665. > (diagnose_flexarrays): Avoid checking the upper bound of arrays. > (check_flexarrays): Same.
This broke bootstrap, I've committed following fix as obvious: 2016-02-04 Jakub Jelinek <ja...@redhat.com> * class.c (find_flexarrays): Don't declare dom variable. (diagnose_flexarray): Likewise. --- gcc/cp/class.c.jj 2016-02-04 10:00:26.000000000 +0100 +++ gcc/cp/class.c 2016-02-04 12:01:38.341794819 +0100 @@ -6683,7 +6683,7 @@ find_flexarrays (tree t, flexmems_t *fme continue; /* Determine the upper bound of the array if it has one. */ - if (tree dom = TYPE_DOMAIN (fldtype)) + if (TYPE_DOMAIN (fldtype)) { if (fmem->array) { @@ -6694,7 +6694,7 @@ find_flexarrays (tree t, flexmems_t *fme if (!fmem->after) fmem->after = fld; } - else if (integer_all_onesp (TYPE_MAX_VALUE (dom))) + else if (integer_all_onesp (TYPE_MAX_VALUE (TYPE_DOMAIN (fldtype)))) /* Remember the first zero-length array unless a flexible array member has already been seen. */ fmem->array = fld; @@ -6732,7 +6732,7 @@ diagnose_flexarrays (tree t, const flexm const char *msg = 0; - if (const_tree dom = TYPE_DOMAIN (TREE_TYPE (fmem->array))) + if (TYPE_DOMAIN (TREE_TYPE (fmem->array))) { if (fmem->after) msg = G_("zero-size array member %qD not at end of %q#T"); Jakub