Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pcc build failure last couple days?



On Tue, 9 Aug 2011, bch%methodlogic.net@localhost wrote:

> --- dependall-pcc ---
> cc1: warnings being treated as errors
> /usr/src/external/bsd/pcc/libexec/ccom/../../dist/pcc/cc/ccom/pftn.c: In 
> function 'imop':
> /usr/src/external/bsd/pcc/libexec/ccom/../../dist/pcc/cc/ccom/pftn.c:3059:14: 
> error: operation on 'p->n_type' may be undefined
> /usr/src/external/bsd/pcc/libexec/ccom/../../dist/pcc/cc/ccom/pftn.c:3076:14: 
> error: operation on 'p->n_type' may be undefined
> /usr/src/external/bsd/pcc/libexec/ccom/../../dist/pcc/cc/ccom/pftn.c:3100:14: 
> error: operation on 'p->n_type' may be undefined
> /usr/src/external/bsd/pcc/libexec/ccom/../../dist/pcc/cc/ccom/pftn.c:3108:14: 
> error: operation on 'p->n_type' may be undefined

I guess this is related to the gcc-4.5 switchover

I have not updated sources for a couple of months so still using gcc 4.1.3
(and, with a newer version of pcc) but line 3059 certainly looks gross..

does the patch attached fix it?

iain
Index: pftn.c
===================================================================
RCS file: /cvsroot/src/external/bsd/pcc/dist/pcc/cc/ccom/pftn.c,v
retrieving revision 1.5
diff -u -p -r1.5 pftn.c
--- pftn.c      3 Jun 2010 19:07:59 -0000       1.5
+++ pftn.c      9 Aug 2011 18:41:17 -0000
@@ -3056,7 +3056,7 @@ imop(int op, NODE *l, NODE *r)
        case PLUS:
                if (li && ri) {
                        p = buildtree(PLUS, l, r);
-                       p->n_type = p->n_type += (FIMAG-FLOAT);
+                       p->n_type += (FIMAG-FLOAT);
                } else {
                        /* If one is imaginary and one is real, make complex */
                        if (li)
@@ -3073,7 +3073,7 @@ imop(int op, NODE *l, NODE *r)
        case MINUS:
                if (li && ri) {
                        p = buildtree(MINUS, l, r);
-                       p->n_type = p->n_type += (FIMAG-FLOAT);
+                       p->n_type += (FIMAG-FLOAT);
                } else if (li) {
                        q = cxstore(mxtyp);
                        p = buildtree(ASSIGN, structref(ccopy(q), DOT, real),
@@ -3097,7 +3097,7 @@ imop(int op, NODE *l, NODE *r)
                if (li && ri)
                        p = buildtree(UMINUS, p, NIL);
                if (li ^ ri)
-                       p->n_type = p->n_type += (FIMAG-FLOAT);
+                       p->n_type += (FIMAG-FLOAT);
                break;
 
        case DIV:
@@ -3105,7 +3105,7 @@ imop(int op, NODE *l, NODE *r)
                if (ri && !li)
                        p = buildtree(UMINUS, p, NIL);
                if (li ^ ri)
-                       p->n_type = p->n_type += (FIMAG-FLOAT);
+                       p->n_type += (FIMAG-FLOAT);
                break;
        default:
                cerror("imop");


Home | Main Index | Thread Index | Old Index