diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 236ca6d..72e62d7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2011-05-25 Jason Merrill <jason@redhat.com> + PR c++/46696 + * typeck.c (cp_build_modify_expr): Check DECL_DEFAULTED_FN. + PR c++/47184 * parser.c (cp_parser_parameter_declaration): Recognize list-initialization. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 69b25d3..5fbb765 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -6748,7 +6748,7 @@ cp_build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs, /* Allow array assignment in compiler-generated code. */ else if (!current_function_decl - || !DECL_ARTIFICIAL (current_function_decl)) + || !DECL_DEFAULTED_FN (current_function_decl)) { /* This routine is used for both initialization and assignment. Make sure the diagnostic message differentiates the context. */ |