summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShenghou Ma <minux.ma@gmail.com>2013-10-10 22:43:34 -0400
committerShenghou Ma <minux.ma@gmail.com>2013-10-10 22:43:34 -0400
commit576ee5f3fff7b09cff58c50de6fe8ec4d4678c05 (patch)
tree0cea75d2a9772863e20d1159723e57145d426d70 /src
parent2f2a2d7ff7b16fe8223f8bb64f3dfec1c78e3d20 (diff)
downloadgo-576ee5f3fff7b09cff58c50de6fe8ec4d4678c05.tar.gz
cmd/gc: re-word some error messages
Fixes issue 6557. R=golang-dev, rsc, tracey.brendan CC=golang-dev https://codereview.appspot.com/14432053
Diffstat (limited to 'src')
-rw-r--r--src/cmd/gc/dcl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/gc/dcl.c b/src/cmd/gc/dcl.c
index 406e8e5bd..c7d13ef06 100644
--- a/src/cmd/gc/dcl.c
+++ b/src/cmd/gc/dcl.c
@@ -289,7 +289,7 @@ variter(NodeList *vl, Node *t, NodeList *el)
for(; vl; vl=vl->next) {
if(doexpr) {
if(el == nil) {
- yyerror("missing expr in var dcl");
+ yyerror("missing expression in var declaration");
break;
}
e = el->n;
@@ -312,7 +312,7 @@ variter(NodeList *vl, Node *t, NodeList *el)
}
}
if(el != nil)
- yyerror("extra expr in var dcl");
+ yyerror("extra expression in var declaration");
return init;
}
@@ -329,7 +329,7 @@ constiter(NodeList *vl, Node *t, NodeList *cl)
vv = nil;
if(cl == nil) {
if(t != N)
- yyerror("constdcl cannot have type without expr");
+ yyerror("const declaration cannot have type without expression");
cl = lastconst;
t = lasttype;
} else {
@@ -340,7 +340,7 @@ constiter(NodeList *vl, Node *t, NodeList *cl)
for(; vl; vl=vl->next) {
if(cl == nil) {
- yyerror("missing expr in const dcl");
+ yyerror("missing value in const declaration");
break;
}
c = cl->n;
@@ -356,7 +356,7 @@ constiter(NodeList *vl, Node *t, NodeList *cl)
vv = list(vv, nod(ODCLCONST, v, N));
}
if(cl != nil)
- yyerror("extra expr in const dcl");
+ yyerror("extra expression in const declaration");
iota += 1;
return vv;
}