diff options
author | Marek Polacek <polacek@redhat.com> | 2014-05-10 20:03:57 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2014-05-10 20:03:57 +0000 |
commit | d033409e943fd9c584a3488df2709671e30555a6 (patch) | |
tree | fdf170b705a741473342bef1cba458b93231ff9f /gcc/c/c-tree.h | |
parent | 00599202676518ba22834e3fb5d818dc9ff8fa98 (diff) | |
download | gcc-d033409e943fd9c584a3488df2709671e30555a6.zip gcc-d033409e943fd9c584a3488df2709671e30555a6.tar.gz gcc-d033409e943fd9c584a3488df2709671e30555a6.tar.bz2 |
c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to maybe_warn_string_init.
* c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
maybe_warn_string_init.
(c_parser_postfix_expression_after_paren_type): Pass type_loc to
maybe_warn_string_init.
* c-tree.h (maybe_warn_string_init): Update declaration.
* c-typeck.c (maybe_warn_string_init): Add location parameter.
Call pedwarn_init with loc instead of with input_location.
(digest_init): Pass init_loc to maybe_warn_string_init.
(pop_init_level): Call pedwarn_init with loc instead of with
input_location.
(set_init_index): Likewise.
(process_init_element): Likewise.
* gcc.dg/pedwarn-init.c: New test.
* gcc.dg/init-string-1.c: Adjust dg-error.
From-SVN: r210300
Diffstat (limited to 'gcc/c/c-tree.h')
-rw-r--r-- | gcc/c/c-tree.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h index ae932fa..e7dcb35 100644 --- a/gcc/c/c-tree.h +++ b/gcc/c/c-tree.h @@ -602,7 +602,7 @@ extern tree build_compound_expr (location_t, tree, tree); extern tree c_cast_expr (location_t, struct c_type_name *, tree); extern tree build_c_cast (location_t, tree, tree); extern void store_init_value (location_t, tree, tree, tree); -extern void maybe_warn_string_init (tree, struct c_expr); +extern void maybe_warn_string_init (location_t, tree, struct c_expr); extern void start_init (tree, tree, int); extern void finish_init (void); extern void really_start_incremental_init (tree); |