* typeck.c (build_modify_expr): Tidy diagnostic message.
From-SVN: r114658
This commit is contained in:
parent
cf24598a2e
commit
decebe5154
|
@ -1,3 +1,7 @@
|
||||||
|
2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
|
||||||
|
|
||||||
|
* typeck.c (build_modify_expr): Tidy diagnostic message.
|
||||||
|
|
||||||
2006-06-14 Mark Mitchell <mark@codesourcery.com>
|
2006-06-14 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
PR c++/28018
|
PR c++/28018
|
||||||
|
|
|
@ -5708,7 +5708,12 @@ build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs)
|
||||||
/* Allow array assignment in compiler-generated code. */
|
/* Allow array assignment in compiler-generated code. */
|
||||||
if (! DECL_ARTIFICIAL (current_function_decl))
|
if (! DECL_ARTIFICIAL (current_function_decl))
|
||||||
{
|
{
|
||||||
|
/* This routine is used for both initialization and assignment.
|
||||||
|
Make sure the diagnostic message differentiates the context. */
|
||||||
|
if (modifycode == INIT_EXPR)
|
||||||
error ("array used as initializer");
|
error ("array used as initializer");
|
||||||
|
else
|
||||||
|
error ("invalid array assignment");
|
||||||
return error_mark_node;
|
return error_mark_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue