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

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


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 24 Feb 2023 10:50:24 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=aEWFSXOJzM0VAOxMbmcE5UR2SI9UuGakZIz+PDYLc14=; b=QDTGyFQST26eFoL0VoGAW/PxOata4oaatwWGNM4V7aywFXTlX1PfEEeSFaQgcbz7Bwhmf//0gk6wwKe5a4AvwHJLfT4ccIL9S1mR0VXBWNSE7ihj789uVnoN+3RgJYzKa+X0eDwqldkPf6Fnkqw4fi45QRnplczl7xn621y5yUK08EwG/uos3S9dZBrDF3FR3WDcqXABMi+niB7deNceRe6oxA4ptELR7jBCfplgrARjGd1zbzncln2zvITxAGJLAAvVSNsUAoRNP/QVtjrX46jw2JwVCsU5PVokvyCZKw43jg57/TJH7BmDg03K1xcfVE4u5xD4FDK2JoGIUywuPw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D45Pcj2aUI63gbYEhHdlDtNZpuPWSKVCgd4y85kA6dyqwarM6OWzpaXpcqe6iFHIoPG6m4pk30wcQEwZ7+c9jhEv+0p3tlBUoIlLnFkc3rOx2cS6fVaxLiwfed+Nzku0WjYI70XBugO2mcGpPxZX47Hyf1afG8cCT+sxnH/beqe01BlVjwJQWoaHcIWlrcgafKtQG8M5pwHYgVvo/MR96ne0DwYy8e8WfoVyeA8VvZ+oYbtbht6bNKmmmgUJ35ShFI2uzCWe5cExwqEzwsD2/LI4ThFc44mKrrMs7t9QtoAFLcU23klLIMw7c4m82qkLiIetfBUQRR28AsuCPOpPng==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.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 10:50:59 +0000
  • Ironport-data: A9a23:8nsIdK707wEii2sJlsZ65AxRtBXGchMFZxGqfqrLsTDasY5as4F+v mUdWGiOOvqPNDSgfYxzOY20o00O7ZHUzNJjTFY5/itmHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraCYnsrLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+45wehBtC5gZlPaoR4AeE/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5mp NA1ECocYCy/3Ly92qqQdrVIwe4GFZy+VG8fkikIITDxK98DGMiGaYOVoNhS0XE3m9xEGuvYa 4wBcz1zYR/cYhpJfFAKFJY5m+TujX76G9FagAvN+exrvC6MlEooiOCF3Nn9I7RmQe18mEqCq 32A1GP+GhwAb/SUyCaf82LqjejK9c/+cNtKTO3hpq803TV/wEQUIgUZaGaiucO2k2qPfuoGN 34a5iMh+P1aGEuDC4OVsweDiHyOswMYWtFQO/Yn8wzLwa3Riy6GAkAUQzgHb8Yp3OcmSDpv2 lKXktfBAT10rKbTWX+b7q2Trz65JW4SN2BqWMMfZQ4M4t2mqodsiBvKF45nCPTs1oWzHizsy TeXqiR4n68UkcMAy6S8+xbAni6ooZ/KCAUy4207Q16Y0++wX6b9D6TA1LQRxa8owFqxJrVZg EU5pg==
  • Ironport-hdrordr: A9a23:596/uq0fZcLKN12+xL6OygqjBLYkLtp133Aq2lEZdPUzSKClfq GV88jzsCWetN9/Yh8dcLy7WZVoI0mslqKdkLNwAV7KZmCP0gaVxepZnOnfKlPbaknD398Y+a B8c7VvTP3cZGIK6voSOTPIduod/A==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

>
>> asm-macros should really have been .S from the outset, as it is ultimately
>> generating assembly, not C.  Rename it, which causes Clang not to complain.
>>
>> We need to introduce rules for generating a .i file from .S, and substituting
>> c_flags for a_flags lets us drop the now-redundant -D__ASSEMBLY__.
>>
>> No functional change.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Thanks.

~Andrew



 


Rackspace

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