Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/pcc/dist/pcc/cc/ccom fix up some undefined beha...



details:   https://anonhg.NetBSD.org/src/rev/d26bcdb618fd
branches:  trunk
changeset: 768171:d26bcdb618fd
user:      plunky <plunky%NetBSD.org@localhost>
date:      Wed Aug 10 08:08:39 2011 +0000

description:
fix up some undefined behaviour, to appease gcc 4.5

diffstat:

 external/bsd/pcc/dist/pcc/cc/ccom/pftn.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (46 lines):

diff -r 076db84ac7a9 -r d26bcdb618fd external/bsd/pcc/dist/pcc/cc/ccom/pftn.c
--- a/external/bsd/pcc/dist/pcc/cc/ccom/pftn.c  Wed Aug 10 07:56:59 2011 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/pftn.c  Wed Aug 10 08:08:39 2011 +0000
@@ -1,5 +1,5 @@
 /*     Id: pftn.c,v 1.280 2010/05/23 19:52:04 ragge Exp        */      
-/*     $NetBSD: pftn.c,v 1.5 2010/06/03 19:07:59 plunky Exp $  */
+/*     $NetBSD: pftn.c,v 1.6 2011/08/10 08:08:39 plunky Exp $  */
 /*
  * Copyright (c) 2003 Anders Magnusson (ragge%ludd.luth.se@localhost).
  * All rights reserved.
@@ -3056,7 +3056,7 @@
        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 @@
        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 @@
                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 @@
                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