aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-tree.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-01-01 20:40:03 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-01-01 20:40:03 +0100
commitb295aee2b10db8517f186af1bea7071bc95d5fcd (patch)
tree53fbcd06f068c1f286ce731e58bc68cc5c3d092f /gcc/c-tree.h
parent91a96b33a9b71785d7372b87824a40da43e5384b (diff)
downloadgcc-b295aee2b10db8517f186af1bea7071bc95d5fcd.zip
gcc-b295aee2b10db8517f186af1bea7071bc95d5fcd.tar.gz
gcc-b295aee2b10db8517f186af1bea7071bc95d5fcd.tar.bz2
re PR c/36489 (Warning "initialized field overwritten" wrongly triggers with multidimensional arrays)
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. From-SVN: r142998
Diffstat (limited to 'gcc/c-tree.h')
-rw-r--r--gcc/c-tree.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index b7430af..3956595 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -1,6 +1,7 @@
/* Definitions for C parsing and type checking.
Copyright (C) 1987, 1993, 1994, 1995, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009
+ Free Software Foundation, Inc.
This file is part of GCC.
@@ -575,7 +576,7 @@ extern void push_init_level (int);
extern struct c_expr pop_init_level (int);
extern void set_init_index (tree, tree);
extern void set_init_label (tree);
-extern void process_init_element (struct c_expr);
+extern void process_init_element (struct c_expr, bool);
extern tree build_compound_literal (tree, tree);
extern tree c_start_case (tree);
extern void c_finish_case (tree);