re PR c++/50054 (Fails to recover from type error in function signature)
PR c++/50054 * typeck2.c (cxx_incomplete_type_diagnostic): Handle init_list_type_node. From-SVN: r177810
This commit is contained in:
parent
565fc114d9
commit
098416302b
|
@ -1,3 +1,9 @@
|
|||
2011-08-16 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/50054
|
||||
* typeck2.c (cxx_incomplete_type_diagnostic): Handle
|
||||
init_list_type_node.
|
||||
|
||||
2011-08-13 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/50075
|
||||
|
|
|
@ -450,6 +450,12 @@ cxx_incomplete_type_diagnostic (const_tree value, const_tree type,
|
|||
break;
|
||||
|
||||
case LANG_TYPE:
|
||||
if (type == init_list_type_node)
|
||||
{
|
||||
emit_diagnostic (diag_kind, input_location, 0,
|
||||
"invalid use of brace-enclosed initializer list");
|
||||
break;
|
||||
}
|
||||
gcc_assert (type == unknown_type_node);
|
||||
if (value && TREE_CODE (value) == COMPONENT_REF)
|
||||
goto bad_member;
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2011-08-16 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/50054
|
||||
* g++.dg/cpp0x/initlist56.C: New.
|
||||
|
||||
2011-08-15 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR testsuite/50085
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
// PR c++/50054
|
||||
// { dg-options -std=c++0x }
|
||||
|
||||
void g( const int& (a)[1] ) {} // { dg-error "array of references" }
|
||||
|
||||
int main () {
|
||||
g( { 1, 2 } ); // { dg-error "initializer list" }
|
||||
}
|
Loading…
Reference in New Issue