PR c/36489
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Jan 2009 19:40:03 +0000 (19:40 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Jan 2009 19:40:03 +0000 (19:40 +0000)
commitd241bf0d8c67ab7ab3c1963303d9515dbe944c11
tree53fbcd06f068c1f286ce731e58bc68cc5c3d092f
parentf12ce4403edfb51034c4b4c7dc1b9fc723159a32
PR c/36489
* c-typeck.c (add_pending_init): Add IMPLICIT argument.  Only
warn about overwriting initializer with side-effects or
-Woverride-init if !IMPLICIT.
(output_init_element): Likewise.  Pass IMPLICIT down to
add_pending_init.
(process_init_element): Add IMPLICIT argument.  Pass it down
to output_init_element.
(push_init_element, pop_init_level, set_designator): Adjust
process_init_element callers.
(set_nonincremental_init, set_nonincremental_init_from_string):
Adjust add_pending_init callers.
(output_pending_init_elements): Adjust output_init_element callers.
* c-tree.h (process_init_element): Adjust prototype.
* c-parser.c (c_parser_initelt, c_parser_initval): Adjust
process_init_element callers.

* gcc.dg/pr36489.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142998 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-parser.c
gcc/c-tree.h
gcc/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr36489.c [new file with mode: 0644]