public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: <libc-ports@sourceware.org>
Subject: Fix warnings from ARM soft-float fpu_control.h
Date: Tue, 18 Jun 2013 00:37:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1306180035390.15498@digraph.polyomino.org.uk> (raw)

I've applied this patch to make the ARM soft-float fpu_control.h 
definitions of _FPU_GETCW and _FPU_SETCW match those used in other 
soft-float cases, to avoid them generating compiler warnings (in 
particular, when building the test-fpucw.c testcase).

diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm
index c7e22cc..a901c6e 100644
--- a/ports/ChangeLog.arm
+++ b/ports/ChangeLog.arm
@@ -1,5 +1,10 @@
 2013-06-18  Joseph Myers  <joseph@codesourcery.com>
 
+	* sysdeps/arm/fpu_control.h [!(_LIBC && !_LIBC_TEST) &&
+	__SOFTFP__] (_FPU_GETCW): Define to (cw) = 0.
+	[!(_LIBC && !_LIBC_TEST) && __SOFTFP__] (_FPU_SETCW): Define to
+	(void) (cw).
+
 	* sysdeps/arm/fpu_control.h [!_LIBC && __SOFTFP__]: Change
 	condition to [!(_LIBC && !_LIBC_TEST) && __SOFTFP__].
 	* sysdeps/arm/test-fpucw.c: New file.
diff --git a/ports/sysdeps/arm/fpu_control.h b/ports/sysdeps/arm/fpu_control.h
index 3ceb58b..513e694 100644
--- a/ports/sysdeps/arm/fpu_control.h
+++ b/ports/sysdeps/arm/fpu_control.h
@@ -24,8 +24,8 @@
 #define _FPU_RESERVED 0xffffffff
 #define _FPU_DEFAULT  0x00000000
 typedef unsigned int fpu_control_t;
-#define _FPU_GETCW(cw) 0
-#define _FPU_SETCW(cw) do { } while (0)
+#define _FPU_GETCW(cw) (cw) = 0
+#define _FPU_SETCW(cw) (void) (cw)
 extern fpu_control_t __fpu_control;
 
 #else

-- 
Joseph S. Myers
joseph@codesourcery.com

                 reply	other threads:[~2013-06-18  0:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.1306180035390.15498@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=libc-ports@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).