From: Christophe Lyon <christophe.lyon@linaro.org>
To: newlib@sourceware.org
Subject: [PATCH] libc/include/math.h: Remove parameter name
Date: Mon, 21 Sep 2020 15:29:21 +0000 [thread overview]
Message-ID: <1600702161-13623-1-git-send-email-christophe.lyon@linaro.org> (raw)
As discussed in GCC bug 97088
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088), parameters in
prototypes of library functions should use reserved names, or no name
at all.
This patch removes the 'x' parameter name from
extern int __isinff (float);
extern int __isinfd (double);
extern int __isnanf (float);
extern int __isnand (double);
extern int __fpclassifyf (float);
extern int __fpclassifyd (double);
extern int __signbitf (float);
extern int __signbitd (double);
to avoid possible clashes with user code in case someone uses
before including Newlib's math.h (or uses some other conflicting
definition)
---
newlib/libc/include/math.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h
index 5e6155c..ba1a8a1 100644
--- a/newlib/libc/include/math.h
+++ b/newlib/libc/include/math.h
@@ -201,14 +201,14 @@ extern int isnan (double);
# define math_errhandling (_MATH_ERRHANDLING_ERRNO | _MATH_ERRHANDLING_ERREXCEPT)
#endif
-extern int __isinff (float x);
-extern int __isinfd (double x);
-extern int __isnanf (float x);
-extern int __isnand (double x);
-extern int __fpclassifyf (float x);
-extern int __fpclassifyd (double x);
-extern int __signbitf (float x);
-extern int __signbitd (double x);
+extern int __isinff (float);
+extern int __isinfd (double);
+extern int __isnanf (float);
+extern int __isnand (double);
+extern int __fpclassifyf (float);
+extern int __fpclassifyd (double);
+extern int __signbitf (float);
+extern int __signbitd (double);
/* Note: isinf and isnan were once functions in newlib that took double
* arguments. C99 specifies that these names are reserved for macros
--
2.7.4
next reply other threads:[~2020-09-21 15:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 15:29 Christophe Lyon [this message]
2020-09-22 22:07 ` Jeff Johnston
2020-09-23 9:23 ` Christophe Lyon
2020-09-26 2:54 ` Jeff Johnston
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=1600702161-13623-1-git-send-email-christophe.lyon@linaro.org \
--to=christophe.lyon@linaro.org \
--cc=newlib@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).