P0329R4: Designated Initialization * parser.c (cp_parser_initializer_clause): List in comment grammar designated-initializer-list. (cp_parser_initializer_list): Allow .identifier = without pedwarn for C++2A, parse .identifier { ... }. Improve location_t argument to pedwarn. Add pedwarn for [cst] = designators. Diagnose ... in designated initializer list. Diagnose mixing designated and non-designated initializer clauses for C++2A. Diagnose duplicated identifiers in designators. * name-lookup.h (search_anon_aggr): New declaration. * name-lookup.c (fields_linear_search): Use search_anon_aggr. (search_anon_aggr): New function. * typeck2.c (process_init_constructor_record): Allow designator to skip over some non-static data members. Handle anonymous aggregates. Add diagnostics for designator order not matching member declaration order. * g++.dg/ext/desig2.C: Adjust comment, no sorry about designator refering to second member. (b): New variable and associated expected diagnostic. * g++.dg/ext/desig4.C: For C++2A expect diagnostics. * g++.dg/ext/desig5.C: Add dg-do dg-compile and empty dg-options. * g++.dg/ext/desig8.C: Likewise. * g++.dg/ext/desig9.C: New test. * g++.dg/ext/pr27019.C: Don't expect any diagnostics. * g++.dg/init/error2.C: Adjust expected diagnostics. * g++.dg/cpp0x/desig1.C: Add dg-options with -pedantic, expect warning on C99 designators. * g++.dg/cpp2a/desig1.C: New test. * g++.dg/cpp2a/desig2.C: New test. * g++.dg/cpp2a/desig3.C: New test. * g++.dg/cpp2a/desig4.C: New test. * g++.dg/cpp2a/desig5.C: New test. * g++.dg/cpp2a/desig6.C: New test. From-SVN: r254964
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
ChangeLog | Loading commit data... | |
ChangeLog-1993 | Loading commit data... | |
ChangeLog-1994 | Loading commit data... | |
ChangeLog-1995 | Loading commit data... | |
ChangeLog-1996 | Loading commit data... | |
ChangeLog-1997 | Loading commit data... | |
ChangeLog-1998 | Loading commit data... | |
ChangeLog-1999 | Loading commit data... | |
ChangeLog-2000 | Loading commit data... | |
ChangeLog-2001 | Loading commit data... | |
ChangeLog-2002 | Loading commit data... | |
ChangeLog-2003 | Loading commit data... | |
ChangeLog-2004 | Loading commit data... | |
ChangeLog-2005 | Loading commit data... | |
ChangeLog-2006 | Loading commit data... | |
ChangeLog-2007 | Loading commit data... | |
ChangeLog-2008 | Loading commit data... | |
ChangeLog-2009 | Loading commit data... | |
ChangeLog-2010 | Loading commit data... | |
ChangeLog-2011 | Loading commit data... | |
ChangeLog-2012 | Loading commit data... | |
ChangeLog-2013 | Loading commit data... | |
ChangeLog-2014 | Loading commit data... | |
ChangeLog-2015 | Loading commit data... | |
ChangeLog-2016 | Loading commit data... | |
ChangeLog.ptr | Loading commit data... | |
ChangeLog.tree-ssa | Loading commit data... | |
Make-lang.in | Loading commit data... | |
NEWS | Loading commit data... | |
call.c | Loading commit data... | |
cfns.gperf | Loading commit data... | |
cfns.h | Loading commit data... | |
class.c | Loading commit data... | |
config-lang.in | Loading commit data... | |
constexpr.c | Loading commit data... | |
constraint.cc | Loading commit data... | |
cp-array-notation.c | Loading commit data... | |
cp-cilkplus.c | Loading commit data... | |
cp-cilkplus.h | Loading commit data... | |
cp-gimplify.c | Loading commit data... | |
cp-lang.c | Loading commit data... | |
cp-objcp-common.c | Loading commit data... | |
cp-objcp-common.h | Loading commit data... | |
cp-tree.def | Loading commit data... | |
cp-tree.h | Loading commit data... | |
cp-ubsan.c | Loading commit data... | |
cvt.c | Loading commit data... | |
cxx-pretty-print.c | Loading commit data... | |
cxx-pretty-print.h | Loading commit data... | |
decl.c | Loading commit data... | |
decl.h | Loading commit data... | |
decl2.c | Loading commit data... | |
dump.c | Loading commit data... | |
error.c | Loading commit data... | |
except.c | Loading commit data... | |
expr.c | Loading commit data... | |
friend.c | Loading commit data... | |
g++spec.c | Loading commit data... | |
init.c | Loading commit data... | |
lambda.c | Loading commit data... | |
lang-specs.h | Loading commit data... | |
lex.c | Loading commit data... | |
logic.cc | Loading commit data... | |
mangle.c | Loading commit data... | |
method.c | Loading commit data... | |
name-lookup.c | Loading commit data... | |
name-lookup.h | Loading commit data... | |
operators.def | Loading commit data... | |
optimize.c | Loading commit data... | |
parser.c | Loading commit data... | |
parser.h | Loading commit data... | |
pt.c | Loading commit data... | |
ptree.c | Loading commit data... | |
repo.c | Loading commit data... | |
rtti.c | Loading commit data... | |
search.c | Loading commit data... | |
semantics.c | Loading commit data... | |
tree.c | Loading commit data... | |
type-utils.h | Loading commit data... | |
typeck.c | Loading commit data... | |
typeck2.c | Loading commit data... | |
vtable-class-hierarchy.c | Loading commit data... |