diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-09-25 05:51:45 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-09-25 05:51:45 +0000 |
commit | 6ecce9bc83c881df8fff570ed0f355adca6a3d06 (patch) | |
tree | 619a1f9dad7160656e7f1a7cf5ae0f4291c12a31 /usr.bin/pcc/cc/ccom | |
parent | 25516bd51aeffa8946acd87c45a46fa1961e6ce8 (diff) |
pull from ragge's repo:
Give a better error message for too many {, "from otto".
Diffstat (limited to 'usr.bin/pcc/cc/ccom')
-rw-r--r-- | usr.bin/pcc/cc/ccom/init.c | 7 |
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)) |