r237387 - in /trunk/gcc: c/ChangeLog c/c-parser...

dmalcolm@gcc.gnu.org dmalcolm@gcc.gnu.org
Mon Jun 13 17:14:00 GMT 2016


Author: dmalcolm
Date: Mon Jun 13 17:14:42 2016
New Revision: 237387

URL: https://gcc.gnu.org/viewcvs?rev=237387&root=gcc&view=rev
Log:
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.


Added:
    trunk/gcc/testsuite/gcc.dg/spellcheck-fields-3.c
Modified:
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-parser.c
    trunk/gcc/c/c-tree.h
    trunk/gcc/c/c-typeck.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/c99-init-2.c
    trunk/gcc/testsuite/gcc.dg/init-bad-8.c



More information about the Gcc-cvs mailing list