summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2007-09-25 05:51:44 +0000
committerotto <otto@openbsd.org>2007-09-25 05:51:44 +0000
commitf5bc6949c517ee5c955753d3dc96103083e137b8 (patch)
treedf219f363142585d2c157308a2a9f4e05beafba5
parentoops i was suppose to pass cvs_directory_tag to cvs_file_classify(). (diff)
downloadwireguard-openbsd-f5bc6949c517ee5c955753d3dc96103083e137b8.tar.xz
wireguard-openbsd-f5bc6949c517ee5c955753d3dc96103083e137b8.zip
pull from ragge's repo:
Give a better error message for too many {, "from otto".
-rw-r--r--usr.bin/pcc/cc/ccom/init.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/pcc/cc/ccom/init.c b/usr.bin/pcc/cc/ccom/init.c
index ed4a6ba1a92..11ed64dbbe4 100644
--- a/usr.bin/pcc/cc/ccom/init.c
+++ b/usr.bin/pcc/cc/ccom/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.5 2007/09/24 15:57:09 otto Exp $ */
+/* $OpenBSD: init.c,v 1.6 2007/09/25 05:51:44 otto Exp $ */
/*
* Copyright (c) 2004, 2007 Anders Magnusson (ragge@ludd.ltu.se).
@@ -263,6 +263,7 @@ stkpush(void)
if (idebug) {
printf("stkpush: '%s' %s ", sp->sname, scnames(sp->sclass));
tprint(stdout, t, 0);
+ printf("\n");
}
#endif
@@ -301,7 +302,7 @@ stkpush(void)
if (ISARY(is->in_t))
is->in_df = pstk->in_df+1;
} else
- cerror("onstk");
+ uerror("too many left braces");
is->in_prev = pstk;
pstk = is;
@@ -896,7 +897,7 @@ prtstk(struct instk *in)
printf("%p) '%s' ", in, in->in_sym->sname);
tprint(stdout, in->in_t, 0);
printf(" %s ", scnames(in->in_sym->sclass));
- if (in->in_df && in->in_df->ddim)
+ if (ISARY(in->in_t) && in->in_df->ddim)
printf("arydim=%d ", in->in_df->ddim);
printf("ninit=%d ", in->in_n);
if (BTYPE(in->in_t) == STRTY || ISARY(in->in_t))