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.
14 lines
194 B
C
14 lines
194 B
C
// PR c++/84518
|
|
// { dg-do compile { target c++11 } }
|
|
|
|
template<int> void foo()
|
|
{
|
|
int x[=]; // { dg-error "" }
|
|
[&x]{};
|
|
}
|
|
|
|
void bar()
|
|
{
|
|
foo<0>(); // { dg-prune-output "not declared" }
|
|
}
|