From: Florian Weimer <fweimer@redhat.com>
To: libc-alpha@sourceware.org
Subject: [PATCH] wcsmbs: Avoid escaped character literals in <wchar.h>
Date: Mon, 17 Feb 2020 11:57:05 +0100 [thread overview]
Message-ID: <8736b9scqm.fsf@oldenburg2.str.redhat.com> (raw)
They confuse scripts/conformtest.py because it treats the L and the
x7f as namespace-violating identifiers.
These failures are only visibile if the conform tests are run in such
a way that __USE_EXTERN_INLINES is defined.
-----
wcsmbs/wchar.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 5e0d65b14e..3e88be1f16 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -316,13 +316,13 @@ extern size_t mbrlen (const char *__restrict __s, size_t __n,
extern wint_t __btowc_alias (int __c) __asm ("btowc");
__extern_inline wint_t
__NTH (btowc (int __c))
-{ return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f'
+{ return (__builtin_constant_p (__c) && __c >= 0 && __c <= 0x7f
? (wint_t) __c : __btowc_alias (__c)); }
extern int __wctob_alias (wint_t __c) __asm ("wctob");
__extern_inline int
__NTH (wctob (wint_t __wc))
-{ return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f'
+{ return (__builtin_constant_p (__wc) && __wc >= 0 && __wc <= 0x7f
? (int) __wc : __wctob_alias (__wc)); }
__extern_inline size_t
next reply other threads:[~2020-02-17 10:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 10:57 Florian Weimer [this message]
2020-02-17 11:57 ` [PATCH] wcsmbs: Avoid escaped character literals in <wchar.h> Andreas Schwab
2020-02-17 12:47 ` Florian Weimer
2020-02-17 16:06 ` Andreas Schwab
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8736b9scqm.fsf@oldenburg2.str.redhat.com \
--to=fweimer@redhat.com \
--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).