[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen: Work around Clang -E vs -Wunicode bug


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 24 Feb 2023 12:17:57 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XQe7NUCwpXPD6Tur/KcP0YWIbGixxBBFMoamjTuI6a4=; b=RMmDiAHq8Zk13HqQZ1Q2HJe6cZwfjgnvLlQKJUeoWgTOKUfos8eAnpiV7apm05vLHYIhP76L/zzC26yhUGyrF8ffzY0bTaFAF/Bt2BCCYx8O0KpsxfUDeJXtlsobsuaKljznqgsMAwB9cUeN90Wjbz+iPITtjn0cOP/VS12AopVBOc+TICYC4mT+fYhOUwd+QDtiV67doVxQ1gDaMpYL950v74RsLbl3ELLGmrn0Osg66s7UB0BjsJ+nBpSOKihifpIEp9jx/Vn9uAbUEcAQ02CzSNqqBaRotB3qPUaQukqvDzTd7kmLaIu7DlncCAonW4wS2QhtbKhK+bPAX908SA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oVopxcYGVyWDyOzRKR6+fCRnqTUv7WabRF8JeyjyqUu20pkjAKjkl/+x6W7QM4lJQwCVZ/Sv5JKuPg2XoVw1vx3tykMVtKHk4zAPyENEq0SmQy0E42zRuiaacypEGdqAr6WhlVjPKSDo8FHiYiOqDyPfnTMP1HAO9zmGt5DrsGnM/CZ7+adABCnRhuazMqs+UWDC9HJ+pEpqNJ+giO4CHWxVSwQH0pt3WMAdiypOg1mwKLYFj43Fet/oXlolre1ncigE8HWNe9Zvl6VeB4nLJc1a6k4CedGCid6r6gWIMImyFYVb4i4kihutZNV8IYnKycwqFm/3nXB7sv2Ykmdh7g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 24 Feb 2023 11:18:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.02.2023 11:50, Andrew Cooper wrote:
> On 24/02/2023 7:27 am, Jan Beulich wrote:
>> On 23.02.2023 23:03, Andrew Cooper wrote:
>>> https://github.com/llvm/llvm-project/issues/60958
>>>
>>> While trying to work around a different Clang-IAS bug, I stubled onto
>>>
>>>   In file included from arch/x86/asm-macros.c:3:
>>>   ./arch/x86/include/asm/spec_ctrl_asm.h:144:19: error: \u used with
>>>   no following hex digits; treating as '\' followed by identifier 
>>> [-Werror,-Wunicode]
>>>   .L\@_fill_rsb_loop\uniq:
>>>                     ^
>>>
>>> It turns out that Clang -E is sensitive to the file extension of the source
>>> file it is processing.
>> I'm inclined to say there's no bug there in Clang. Gcc, while not affected
>> in this specific regard, also treats .c and .S differently in some perhaps
>> subtle ways.
> 
> This part was just an observation.
> 
> Whether .c and .S should be treated the same or not, this -Wunicode
> diagnostic is given against something which isn't in a char/string
> literal, and that is a bug.

Why are you thinking of only string literals? Gcc is quite okay with

void test\u0024ä\u00F6ü(void) {}

yielding "test$äöü" in the object file (I haven't understood yet why it
dislikes \u0040, i.e. @.)

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.