In a template we were happily embedding error_mark_node in a MODOP_EXPR, leading to confusion later. gcc/cp/ChangeLog: * typeck.c (build_x_modify_expr): Handle error_mark_node arguments. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/lambda/lambda-ice30.C: Adjust. * g++.dg/cpp0x/lambda/lambda-ice31.C: Adjust. * g++.dg/ext/fixed1.C: Adjust. * g++.dg/template/crash107.C: Adjust. * g++.dg/template/error35.C: Adjust. * g++.dg/template/sizeof-template-argument.C: Adjust.
9 lines
178 B
C
9 lines
178 B
C
// PR c++/84518
|
|
// { dg-do compile { target c++11 } }
|
|
|
|
template<typename T> void foo()
|
|
{
|
|
T x[=]; // { dg-error "expected" }
|
|
[&x]{}; // { dg-prune-output "not declared" }
|
|
}
|