re PR c/64918 (invalid (?) warning when initializing structure)
authorMarek Polacek <polacek@redhat.com>
Thu, 7 May 2015 22:14:27 +0000 (22:14 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 7 May 2015 22:14:27 +0000 (22:14 +0000)
commit755e528f969e0f9ef9061479e0ed2b13bcf0f9f2
treea4a9c2c021afac07acf40e5d31b847542a1e7816
parent0173bd2a038cbeef871b22b312a6856ab1dcda2a
re PR c/64918 (invalid (?) warning when initializing structure)

PR c/64918
* c.opt (Woverride-init-side-effects): New option.

* c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
(output_init_element): Likewise.

* doc/invoke.texi: Document -Woverride-init-side-effects.

* gcc.dg/Woverride-init-side-effects-1.c: New test.
* gcc.dg/Woverride-init-side-effects-2.c: New test.

From-SVN: r222894
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c.opt
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Woverride-init-side-effects-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Woverride-init-side-effects-2.c [new file with mode: 0644]