projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
718fe24
)
Print an explicit error for the attempt to assign to arrays.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Sat, 17 Nov 2007 17:49:13 +0000
(17:49 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Sat, 17 Nov 2007 17:49:13 +0000
(17:49 +0000)
[r18454]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
2f8a5fe
..
7212c85
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-3201,7
+3201,9
@@
static void semantic_binexpr_assign(binary_expression_t *expression)
expression_t *left = expression->left;
type_t *type_left = left->datatype;
- if(type_left != NULL) {
+ if (type_left->type == TYPE_ARRAY) {
+ parse_error_expected("Cannot assign to arrays.");
+ } else if (type_left != NULL) {
semantic_assign(type_left, &expression->right, "assignment");
}