aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-tree.h
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2016-06-13 17:14:42 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2016-06-13 17:14:42 +0000
commitf7e4f2e3f34178795180ed6160b135eb7072c987 (patch)
tree2eb2383fe9349016fa39c6cb44fb770d7da1cc4b /gcc/c/c-tree.h
parent5a0fa907139874e1c08f35a9de900548597a3e1b (diff)
downloadgcc-f7e4f2e3f34178795180ed6160b135eb7072c987.zip
gcc-f7e4f2e3f34178795180ed6160b135eb7072c987.tar.gz
gcc-f7e4f2e3f34178795180ed6160b135eb7072c987.tar.bz2
C: fixits for named initializers
gcc/c/ChangeLog: * c-parser.c (c_parser_initelt): Provide location of name for new location_t param of set_init_label. * c-tree.h (set_init_label): Add location_t param. * c-typeck.c (set_init_index): Add "fieldname_loc" location_t param and use it when issuing error messages about unrecognized field names. Attempt to provide a fixit hint if appropriate, otherwise update the error message to provide the type name. gcc/testsuite/ChangeLog: * gcc.dg/c99-init-2.c (c): Update expected error message. * gcc.dg/init-bad-8.c (foo): Likewise. * gcc.dg/spellcheck-fields-3.c: New test case. From-SVN: r237387
Diffstat (limited to 'gcc/c/c-tree.h')
-rw-r--r--gcc/c/c-tree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h
index b4374e3..8f10a13 100644
--- a/gcc/c/c-tree.h
+++ b/gcc/c/c-tree.h
@@ -639,7 +639,7 @@ extern void finish_implicit_inits (location_t, 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 set_init_label (location_t, tree, location_t, 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);