summaryrefslogtreecommitdiff
path: root/usr.bin/pcc/ccom/pftn.c
diff options
context:
space:
mode:
authorStefan Kempf <stefan@cvs.openbsd.org>2007-12-22 22:56:32 +0000
committerStefan Kempf <stefan@cvs.openbsd.org>2007-12-22 22:56:32 +0000
commit6ca4d0c856b7b95130215d2f95e092898ad991db (patch)
tree4ee33bbf29471bebe47a5c23a88285aafafb9440 /usr.bin/pcc/ccom/pftn.c
parentb575ace5a68441ce83385134f42dfd60c88a1d2c (diff)
Sync with main repo.
Diffstat (limited to 'usr.bin/pcc/ccom/pftn.c')
-rw-r--r--usr.bin/pcc/ccom/pftn.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/pcc/ccom/pftn.c b/usr.bin/pcc/ccom/pftn.c
index 0e68d40b469..a648525d508 100644
--- a/usr.bin/pcc/ccom/pftn.c
+++ b/usr.bin/pcc/ccom/pftn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pftn.c,v 1.9 2007/12/09 18:47:07 ragge Exp $ */
+/* $OpenBSD: pftn.c,v 1.10 2007/12/22 22:56:31 stefan Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se).
* All rights reserved.
@@ -1779,7 +1779,7 @@ tymerge(NODE *typ, NODE *idp)
#endif
idp->n_type = typ->n_type;
- idp->n_qual = typ->n_qual;
+ idp->n_qual |= typ->n_qual;
tylkp = &tylnk;
tylkp->next = NULL;
@@ -1804,7 +1804,6 @@ tymerge(NODE *typ, NODE *idp)
/* now idp is a single node: fix up type */
idp->n_type = ctype(idp->n_type);
-// idp->n_qual = DECQAL(idp->n_qual);
/* in case ctype has rewritten things */
if ((t = BTYPE(idp->n_type)) != STRTY && t != UNIONTY)
@@ -1921,8 +1920,10 @@ tyreduce(NODE *p, struct tylnk **tylkp, int *ntdim)
TWORD t, q;
o = p->n_op;
- if (o == NAME)
+ if (o == NAME) {
+ p->n_qual = DECQAL(p->n_qual);
return;
+ }
t = INCREF(p->n_type);
q = p->n_qual;