[Bug c++/88380] [8 Regression] Sequence of not-explicitly initialised, initialised, variable length generates no initialiser
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 26 04:55:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88380
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:b9bfe25d3a7f925754df3a557e3b1743d21d0c4d
commit r8-10076-gb9bfe25d3a7f925754df3a557e3b1743d21d0c4d
Author: Jason Merrill <jason@redhat.com>
Date: Tue Feb 25 13:37:18 2020 -0500
PR c++/88380 - wrong-code with flexible array and NSDMI.
Here 'skipped' was set to -1 to force an explicit initializer for 'uninit'
before the initializer for 'initialized', and so we also tried to emit an
explicit initializer for the flexible array, for which build_zero_init
returns error_mark_node. We should ignore flexarrays even when
skipped < 0.
gcc/cp/ChangeLog
2020-02-25 Jason Merrill <jason@redhat.com>
PR c++/88380 - wrong-code with flexible array and NSDMI.
* typeck2.c (process_init_constructor_record): Skip flexarrays.
More information about the Gcc-bugs
mailing list