aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-tree.h
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2014-05-09 17:50:25 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2014-05-09 17:50:25 +0000
commitea58ef42e54fde03cc8e57cfb59c4c5d7ec1806a (patch)
treecd6331ec639c692e7b4cbb94402526fdfa70a6b8 /gcc/c/c-tree.h
parent4f61140c2a7c3ade3c0ccd0514c3136efc2c0b18 (diff)
downloadgcc-ea58ef42e54fde03cc8e57cfb59c4c5d7ec1806a.zip
gcc-ea58ef42e54fde03cc8e57cfb59c4c5d7ec1806a.tar.gz
gcc-ea58ef42e54fde03cc8e57cfb59c4c5d7ec1806a.tar.bz2
re PR c/61096 (error_init lacks a location)
PR c/61096 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level. (c_parser_initelt): Pass location to set_init_label. Pass array index location to set_init_index. * c-tree.h (push_init_level): Update declaration. (pop_init_level): Likewise. (set_init_index): Likewise. (set_init_label): Likewise. * c-typeck.c (error_init): Add location parameter. Call error_at instead of error. (digest_init): Pass init_loc to error_init. (really_start_incremental_init): (push_init_level): Add location parameter. Pass loc to pop_init_level and error_init. (pop_init_level): Likewise. (set_designator): Add location parameter. Pass loc to pop_init_level, push_init_level, and error_init. (set_init_index): Add location parameter. Pass loc to error_init and set_designator. (set_init_label): Likewise. (output_init_element): Pass loc to error_init. (process_init_element): Pass loc to error_init, pop_init_level, pedwarn_init, and push_init_level. * gcc.dg/pr61096-1.c: New test. * gcc.dg/pr61096-2.c: New test. From-SVN: r210280
Diffstat (limited to 'gcc/c/c-tree.h')
-rw-r--r--gcc/c/c-tree.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h
index a6e7327..ae932fa 100644
--- a/gcc/c/c-tree.h
+++ b/gcc/c/c-tree.h
@@ -606,10 +606,10 @@ extern void maybe_warn_string_init (tree, struct c_expr);
extern void start_init (tree, tree, int);
extern void finish_init (void);
extern void really_start_incremental_init (tree);
-extern void push_init_level (int, struct obstack *);
-extern struct c_expr pop_init_level (int, struct obstack *);
-extern void set_init_index (tree, tree, struct obstack *);
-extern void set_init_label (tree, struct obstack *);
+extern void push_init_level (location_t, int, struct obstack *);
+extern struct c_expr pop_init_level (location_t, int, struct obstack *);
+extern void set_init_index (location_t, tree, tree, struct obstack *);
+extern void set_init_label (location_t, tree, struct obstack *);
extern void process_init_element (location_t, struct c_expr, bool,
struct obstack *);
extern tree build_compound_literal (location_t, tree, tree, bool);