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

Re: Xen reliance on non-standard GCC features


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 9 Jun 2023 11:47:33 +0200
  • 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=eFjd+GCVzXTAW7Y23VnBIz8RizZRzYtdgZQjws2wBpI=; b=ApLuT61/yHAKdZrLZ7/FO7+MfTmeBTlTXaAkAHIqsUHKPNLHoCrF/YMldYZTAyILrkJRR4YdZTH83PkxIuIE7fHDdaNKgjZTckG14vzdyWiX2lgn5eHJFv/L6U6voO8x8BCcJoGv5hNG+z4v3sEtuunPFPR94UV57kmVrFSTTHCKyHtuH2rDnd6At+HBWljxLhjhjhOldo3hX33Z+sNeH7KfBSHu5dMn/6dW7ra2e/qXjdzh6XcyidsZ3Z4GDsg1K+8gnSRtx9bVJNMcHHf451vVKjHW8ztTAjnbe1on/sPPHyCtDQMQ75hj93tccoTOe68ya704fvgbGyw8oJiOtg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kXHdYjzYYF7EqAHPaa+dUQmIoouk1WJih+CMyiL8zzxqjutLcYmm63fgufxHlTU/X2DHdzZBVz8x6n1i85x9r3xNjIFSP1b+K6Ef3NbepbgY6IGKcSuOVgUwrkp5PsSaXx0DZnzTB76zP8tEHk2EqbjKJmBmSS36bNdBxmpHRpqhoJ4I6vWzC+HtVL1vx9Ie/mzUL5zxmPQG7MxAqrD3gMFODnbfIPBx8RgZXaPpmb0pQDnlKwW4LKAkn/Nalu4uxUrX9J+RtZkQbw/K5Cl5X2JgLIRHxiK7JMVjfxKXwUO07R3cSdDCb4k7G3WuHkGkqU2g6U5N2bgbNdVJPOn3vQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <stefano.stabellini@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "consulting@xxxxxxxxxxx" <consulting@xxxxxxxxxxx>, Roberto Bagnara <bagnara@xxxxxxxxxxx>
  • Delivery-date: Fri, 09 Jun 2023 09:48:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 09.06.2023 11:36, Michal Orzel wrote:
> On 09/06/2023 10:54, Jan Beulich wrote:
>> On 08.06.2023 14:18, Roberto Bagnara wrote:
>>> On 07/06/23 09:39, Jan Beulich wrote:
>>>> On 05.06.2023 15:26, Roberto Bagnara wrote:
>>>>> On 05/06/23 11:28, Jan Beulich wrote:
>>>>>> On 05.06.2023 07:28, Roberto Bagnara wrote:
>>>>>>> U6) Empty declarations.
>>>>>
>>>>> Examples:
>>>>>
>>>>> xen/arch/arm/arm64/lib/find_next_bit.c:57.29:
>>>>> empty declaration (ill-formed for the C99 standard, ISO/IEC 9899:1999 
>>>>> Section 6.7: "An empty declaration." [STD.emptdecl]). Tool used is 
>>>>> `/usr/bin/aarch64-linux-gnu-gcc-12'
>>>>>
>>>>> xen/arch/arm/arm64/lib/find_next_bit.c:103.34:
>>>>> empty declaration (ill-formed for the C99 standard, ISO/IEC 9899:1999 
>>>>> Section 6.7: "An empty declaration." [STD.emptdecl]). Tool used is 
>>>>> `/usr/bin/aarch64-linux-gnu-gcc-12'
>>>>
>>>> Looks like these could be taken care of by finally purging our
>>>> EXPORT_SYMBOL() stub.
>>>>
>>>>> xen/arch/arm/include/asm/vreg.h:143.26:
>>>>> empty declaration (ill-formed for the C99 standard, ISO/IEC 9899:1999 
>>>>> Section 6.7: "An empty declaration." [STD.emptdecl]). Tool used is 
>>>>> `/usr/bin/aarch64-linux-gnu-gcc-12'
>>>>>
>>>>> xen/arch/arm/include/asm/vreg.h:144.26:
>>>>> empty declaration (ill-formed for the C99 standard, ISO/IEC 9899:1999 
>>>>> Section 6.7: "An empty declaration." [STD.emptdecl]). Tool used is 
>>>>> `/usr/bin/aarch64-linux-gnu-gcc-12'
>>>>
>>>> I'm having trouble spotting anything suspicious there.
>>>
>>> The macro expands to definitions of inline functions
>>> and after the macro invocation there is a ";".
>>>
>>> The preprocessed code is then:
>>>
>>> static inline void foo() { ... }
>>> ;
>>>
>>> where the final ";" is an empty declaration not allowed by
>>> the C99 language standard.
>>
>> Oh, I see.
>>
>>> Removing the ";" after the macro invocation is a possible solution,
>>> but other possibilities exist if this is strongly unwanted.
>>
>> We have other macros to instantiate functions, and there no stray
>> semicolons are used. I think this wants doing the same way here, but it
>> being Arm code the ultimate say is with the Arm maintainers.
> Apart from vreg.h the same applies to TLB_HELPER of arm32/arm64.
> I think also TYPE_SAFE would want to be fixed.

Indeed. For this last one I wonder though whether it wouldn't be better
to continue to permit (really: require) the semicolon at the use sites,
by putting the typedef-s last and omitting the semicolon in the macro
definitions.

Jan



 


Rackspace

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