From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: libc-alpha@sourceware.org
Cc: adhemerval.zanella@linaro.org,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Subject: [PATCH] stdio: Move include of bits/stdio-ldbl.h before bits/stdio.h
Date: Mon, 22 Mar 2021 12:15:31 +0100 [thread overview]
Message-ID: <20210322111530.3215018-1-glaubitz@physik.fu-berlin.de> (raw)
On targets where long double math is optional and the architecture
does not support support long double, glibc defines a number of
redirection macros which alias "foo" with "__nldbl_foo" while
applying an __asm__ label.
As a result, the __asm__ label gets applied after vfprintf() has
already been used which is not allowed. Moving bits/stdio-ldbl.h
bits/stdio.h in libio/stdio.h avoids this problem.
Fixes bug 27558.
---
libio/stdio.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libio/stdio.h b/libio/stdio.h
index 144137cf67..ae5337e855 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -857,6 +857,11 @@ extern void funlockfile (FILE *__stream) __THROW;
extern int __uflow (FILE *);
extern int __overflow (FILE *, int);
+#include <bits/floatn.h>
+#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
+# include <bits/stdio-ldbl.h>
+#endif
+
/* If we are compiling with optimizing read this file. It contains
several optimizing inline functions and macros. */
#ifdef __USE_EXTERN_INLINES
@@ -866,11 +871,6 @@ extern int __overflow (FILE *, int);
# include <bits/stdio2.h>
#endif
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdio-ldbl.h>
-#endif
-
__END_DECLS
#endif /* <stdio.h> included. */
--
2.31.0
next reply other threads:[~2021-03-22 11:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 11:15 John Paul Adrian Glaubitz [this message]
2021-03-23 17:59 ` Adhemerval Zanella
2021-08-16 12:24 ` John Paul Adrian Glaubitz
2022-01-22 10:39 ` John Paul Adrian Glaubitz
2022-02-23 20:51 ` John Paul Adrian Glaubitz
2022-02-24 17:10 ` Adhemerval Zanella
2022-03-03 19:25 ` Adhemerval Zanella
2022-03-08 10:34 ` John Paul Adrian Glaubitz
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=20210322111530.3215018-1-glaubitz@physik.fu-berlin.de \
--to=glaubitz@physik.fu-berlin.de \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@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).