Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/m68k/fpe avoid a GCC warning with this:



details:   https://anonhg.NetBSD.org/src/rev/70c7dc0b71b7
branches:  trunk
changeset: 814474:70c7dc0b71b7
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Mar 23 05:25:51 2016 +0000

description:
avoid a GCC warning with this:

+#if defined(__GNUC__) && (__GNUC__ >= 5) && defined(__OPTIMIZE__)
+       x.fp_sign = 0;
+#endif

(ridiculous, but seems better than disabling the warning entirely.)

diffstat:

 sys/arch/m68k/fpe/fpu_trig.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 7712de6ee57a -r 70c7dc0b71b7 sys/arch/m68k/fpe/fpu_trig.c
--- a/sys/arch/m68k/fpe/fpu_trig.c      Wed Mar 23 05:24:54 2016 +0000
+++ b/sys/arch/m68k/fpe/fpu_trig.c      Wed Mar 23 05:25:51 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu_trig.c,v 1.15 2013/04/20 07:32:45 isaki Exp $      */
+/*     $NetBSD: fpu_trig.c,v 1.16 2016/03/23 05:25:51 mrg Exp $        */
 
 /*
  * Copyright (c) 1995  Ken Nakata
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_trig.c,v 1.15 2013/04/20 07:32:45 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_trig.c,v 1.16 2016/03/23 05:25:51 mrg Exp $");
 
 #include "fpu_emulate.h"
 
@@ -334,6 +334,9 @@
        if (ISZERO(&fe->fe_f2))
                return &fe->fe_f2;
 
+#if defined(__GNUC__) && (__GNUC__ >= 5) && defined(__OPTIMIZE__)
+       x.fp_sign = 0;
+#endif
        CPYFPN(&x, &fe->fe_f2);
 
        /* x = abs(input) */



Home | Main Index | Thread Index | Old Index