[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 08:27:50 +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=h1W3ahLFMDrKh3m+7DCKKG2s+oRCZSvDa5+8j4EkP1k=; b=BX+fQhnMeBjF40zVRVzhVjhlM6YIUOrIr/mbwXTetu/F2X+EXksBmapB3Wd0oCfWeXemNgMfCJB1KEZ9YSyVDVtjK3CgvyQOfZ4MSoCdXDyFcv/OZ52Q3CLbfZn6f75QQfhdwXCLC2N+2G9ZHB0PguQPb3s0wxEyIEn2ZuhSoXqoCLl+hWSf0PvTlNaIybkrzoSEYCbu3i5rx4MZ62eP0hk1cTveKZp0+vKnxqLmRwZwBbWlOtiFPkILnhQipqxsm58WMzkR2VLQzcd+I3a9qwiZWqNmrFX6oUbKxJsG+bVfFvPlF6TDTEACoaG5WSWAxg66Rl7+pri4OsDQ3KqEkA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PRqvgE9GO576L71p8+lVUFI4VV45M+lsQ9KlLg4CIIo1YSQvPUBfx/327iiBQsiIIPXVmVWN2oo0Jf/sen4OCyRzh/9dP/Dr+98xt3/aZevxcGfRMJmwGAZ+UX4z7r/9xhj2GbAI4Y24yEYxIicpR4djw/hbn7zhiXdrXX4rWSIU5M2U4ztjje/g2R7N/vC7A9BNUnqGoIMhjjEMfTxTlRTvcfVJ4zGce7mIua8DX50UHqqb0U9/D6OVLb2uu7DiXjxhGd8eCEa/2EIOCPzypwNJnB8Z83UmKFrZzrdmh4GwO5PCo74aqKg83F6naoG4uhdGlAEmSDvlGk29QneWqA==
  • 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 07:28:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

> 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>





 


Rackspace

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