Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/include do the pragma dance to avoid -Wshadow



details:   https://anonhg.NetBSD.org/src/rev/d20d9a6b5d6a
branches:  trunk
changeset: 966420:d20d9a6b5d6a
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Oct 29 04:55:36 2019 +0000

description:
do the pragma dance to avoid -Wshadow

diffstat:

 sys/arch/mips/include/fenv.h |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r a9cf141c7853 -r d20d9a6b5d6a sys/arch/mips/include/fenv.h
--- a/sys/arch/mips/include/fenv.h      Tue Oct 29 03:49:59 2019 +0000
+++ b/sys/arch/mips/include/fenv.h      Tue Oct 29 04:55:36 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fenv.h,v 1.4 2017/03/22 23:11:09 chs Exp $     */
+/*     $NetBSD: fenv.h,v 1.5 2019/10/29 04:55:36 christos Exp $        */
 
 /*-
  * Copyright (c) 2004-2005 David Schultz <das%FreeBSD.ORG@localhost>
@@ -86,6 +86,11 @@
        __asm __volatile("ctc1 %0,$31" : : "r" (__fpsr));
 }
 
+#if __GNUC_PREREQ__(8, 0)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow"
+#endif
+
 __fenv_static inline int
 feclearexcept(int __excepts)
 {
@@ -201,6 +206,10 @@
        return (0);
 }
 
+#if __GNUC_PREREQ__(8, 0)
+#pragma GCC diagnostic pop
+#endif
+
 #if defined(_NETBSD_SOURCE) || defined(_GNU_SOURCE)
 
 __fenv_static inline int



Home | Main Index | Thread Index | Old Index