re PR c++/49838 ([C++0x] ICE in cp_parser_perform_range_for_lookup, at cp/parser.c:8796)
/cp 2011-07-25 Paolo Carlini <paolo.carlini@oracle.com> PR c++/49838 * parser.c (cp_parser_perform_range_for_lookup): Early return if error_operand_p (range). /testsuite 2011-07-25 Paolo Carlini <paolo.carlini@oracle.com> PR c++/49838 * g++.dg/cpp0x/range-for19.C: New. From-SVN: r176754
This commit is contained in:
parent
c2d8a62e2d
commit
c1703fc185
4 changed files with 25 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2011-07-25 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/49838
|
||||
* parser.c (cp_parser_perform_range_for_lookup): Early return if
|
||||
error_operand_p (range).
|
||||
|
||||
2011-07-23 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/49823
|
||||
|
|
|
@ -8795,6 +8795,9 @@ cp_convert_range_for (tree statement, tree range_decl, tree range_expr)
|
|||
static tree
|
||||
cp_parser_perform_range_for_lookup (tree range, tree *begin, tree *end)
|
||||
{
|
||||
if (error_operand_p (range))
|
||||
return error_mark_node;
|
||||
|
||||
if (!COMPLETE_TYPE_P (complete_type (TREE_TYPE (range))))
|
||||
{
|
||||
error ("range-based %<for%> expression of type %qT "
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2011-07-25 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/49838
|
||||
* g++.dg/cpp0x/range-for19.C: New.
|
||||
|
||||
2011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
PR testsuite/49753
|
||||
|
|
11
gcc/testsuite/g++.dg/cpp0x/range-for19.C
Normal file
11
gcc/testsuite/g++.dg/cpp0x/range-for19.C
Normal file
|
@ -0,0 +1,11 @@
|
|||
// PR c++/49838
|
||||
|
||||
// { dg-do compile }
|
||||
// { dg-options "-std=c++0x" }
|
||||
|
||||
int main()
|
||||
{
|
||||
auto a; // { dg-error "no initializer" }
|
||||
for(auto i: a) // { dg-error "deduce" }
|
||||
;
|
||||
}
|
Loading…
Add table
Reference in a new issue