summaryrefslogtreecommitdiff
path: root/usr.bin/pcc/ccom
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-10-20 18:24:12 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-10-20 18:24:12 +0000
commit1d4dc2c42d0356f41acb788e210c753ba7fc6fac (patch)
treeda7756927711b11ef3f5ff9929387b0de761cfcd /usr.bin/pcc/ccom
parent031dbb03df0e2f8f3d99d6531cb103722b2c9a74 (diff)
pull in exname() changes from ragge's repo. we're now back in sync
Diffstat (limited to 'usr.bin/pcc/ccom')
-rw-r--r--usr.bin/pcc/ccom/gcc_compat.c6
-rw-r--r--usr.bin/pcc/ccom/init.c5
-rw-r--r--usr.bin/pcc/ccom/scan.l5
-rw-r--r--usr.bin/pcc/ccom/stabs.c8
-rw-r--r--usr.bin/pcc/ccom/symtabs.c2
-rw-r--r--usr.bin/pcc/ccom/trees.c4
6 files changed, 15 insertions, 15 deletions
diff --git a/usr.bin/pcc/ccom/gcc_compat.c b/usr.bin/pcc/ccom/gcc_compat.c
index f898f072eef..477b467a466 100644
--- a/usr.bin/pcc/ccom/gcc_compat.c
+++ b/usr.bin/pcc/ccom/gcc_compat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gcc_compat.c,v 1.2 2007/10/07 18:36:58 otto Exp $ */
+/* $OpenBSD: gcc_compat.c,v 1.3 2007/10/20 18:24:11 otto Exp $ */
/*
* Copyright (c) 2004 Anders Magnusson (ragge@ludd.luth.se).
* All rights reserved.
@@ -119,11 +119,11 @@ gcc_findname(struct symtab *sp)
struct ren *w;
if ((sp->sflags & SRENAME) == 0)
- return exname(sp->sname);
+ return sp->sname;
for (w = renp; w; w = w->next) {
if (w->old == sp->sname)
- return exname(w->new);
+ return w->new;
}
cerror("gcc_findname %s", sp->sname);
return NULL;
diff --git a/usr.bin/pcc/ccom/init.c b/usr.bin/pcc/ccom/init.c
index 47331d2c82a..c447e0b8add 100644
--- a/usr.bin/pcc/ccom/init.c
+++ b/usr.bin/pcc/ccom/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.1 2007/10/07 17:58:51 otto Exp $ */
+/* $OpenBSD: init.c,v 1.2 2007/10/20 18:24:11 otto Exp $ */
/*
* Copyright (c) 2004, 2007 Anders Magnusson (ragge@ludd.ltu.se).
@@ -266,7 +266,6 @@ stkpush(void)
if (idebug) {
printf("stkpush: '%s' %s ", sp->sname, scnames(sp->sclass));
tprint(stdout, t, 0);
- printf("\n");
}
#endif
@@ -900,7 +899,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 (ISARY(in->in_t) && in->in_df->ddim)
+ if (in->in_df && 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))
diff --git a/usr.bin/pcc/ccom/scan.l b/usr.bin/pcc/ccom/scan.l
index 782fb31bae4..7e774a0f502 100644
--- a/usr.bin/pcc/ccom/scan.l
+++ b/usr.bin/pcc/ccom/scan.l
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: scan.l,v 1.2 2007/10/07 18:34:41 otto Exp $ */
+/* $OpenBSD: scan.l,v 1.3 2007/10/20 18:24:11 otto Exp $ */
/*
* Copyright (c) 2002 Anders Magnusson. All rights reserved.
@@ -142,10 +142,11 @@ extern void yyset_lineno (int);
int i;
yylval.strp = addname(yytext);
+#ifdef GCC_COMPAT
if ((i = gcc_keyword(yylval.strp,
&yylval.nodep)) != 0)
return i;
-// printf("str: %s notype %d parbal %d\n", yytext, notype, parbal);
+#endif
if (!notype) {
s = lookup(yylval.strp, SNOCREAT);
if (s && s->sclass == TYPEDEF)
diff --git a/usr.bin/pcc/ccom/stabs.c b/usr.bin/pcc/ccom/stabs.c
index 58ead7d986a..8263add7129 100644
--- a/usr.bin/pcc/ccom/stabs.c
+++ b/usr.bin/pcc/ccom/stabs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: stabs.c,v 1.1 2007/10/07 17:58:51 otto Exp $ */
+/* $OpenBSD: stabs.c,v 1.2 2007/10/20 18:24:11 otto Exp $ */
/*
* Copyright (c) 2004 Anders Magnusson (ragge@ludd.luth.se).
@@ -183,7 +183,7 @@ findtype(TWORD t, union dimfun *df, struct suedef *sue)
void
stabs_line(int line)
{
- cprint(savestabs, ".stabn %d,0,%d," STABLBL "-%s", N_SLINE, line, stablbl, curfun);
+ cprint(savestabs, ".stabn %d,0,%d," STABLBL "-%s", N_SLINE, line, stablbl, exname(curfun));
cprint(1, STABLBL ":", stablbl++);
}
@@ -194,7 +194,7 @@ void
stabs_lbrac(int blklvl)
{
cprint(savestabs, ".stabn %d,0,%d," STABLBL "-%s",
- N_LBRAC, blklvl, stablbl, curfun);
+ N_LBRAC, blklvl, stablbl, exname(curfun));
cprint(1, STABLBL ":", stablbl++);
}
@@ -205,7 +205,7 @@ void
stabs_rbrac(int blklvl)
{
cprint(savestabs, ".stabn %d,0,%d," STABLBL "-%s\n",
- N_RBRAC, blklvl, stablbl, curfun);
+ N_RBRAC, blklvl, stablbl, exname(curfun));
cprint(1, STABLBL ":", stablbl++);
}
diff --git a/usr.bin/pcc/ccom/symtabs.c b/usr.bin/pcc/ccom/symtabs.c
index 97dd715375a..e690802c02a 100644
--- a/usr.bin/pcc/ccom/symtabs.c
+++ b/usr.bin/pcc/ccom/symtabs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: symtabs.c,v 1.1 2007/10/07 17:58:51 otto Exp $ */
+/* $OpenBSD: symtabs.c,v 1.2 2007/10/20 18:24:11 otto Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se).
* All rights reserved.
diff --git a/usr.bin/pcc/ccom/trees.c b/usr.bin/pcc/ccom/trees.c
index b2df2733ebe..e1940378090 100644
--- a/usr.bin/pcc/ccom/trees.c
+++ b/usr.bin/pcc/ccom/trees.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trees.c,v 1.4 2007/10/08 18:26:29 otto Exp $ */
+/* $OpenBSD: trees.c,v 1.5 2007/10/20 18:24:11 otto Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se).
* All rights reserved.
@@ -2200,7 +2200,7 @@ p2tree(NODE *p)
#ifdef GCC_COMPAT
p->n_name = gcc_findname(q);
#else
- p->n_name = exname(q->sname);
+ p->n_name = q->sname;
#endif
}
} else