From patchwork Mon Feb 17 10:57:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 38122 Received: (qmail 23261 invoked by alias); 17 Feb 2020 10:57:15 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 23169 invoked by uid 89); 17 Feb 2020 10:57:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: us-smtp-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581937031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BPypEpdvHqmRT0DM2Ta/blW1SXAmTBWMkCJ/C7feXlk=; b=EuhVkbg+Jdj7S+oQMAZkbSlHEtmJcdqYRee8xAUzcx0pHdzILmeyrAwJGDqcVzG9BGVz7y rQh8u3VMZw2PbsQvYoKkDuEAKc1tdw3o7NNGckX4gAZBWs3WOGXoPnDLWTwdU8s4ho6vdQ LFLWo7EPNsr+2KJw9JFfQ27VhEDx6+c= From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH] wcsmbs: Avoid escaped character literals in Date: Mon, 17 Feb 2020 11:57:05 +0100 Message-ID: <8736b9scqm.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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