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

Re: [PATCH 2/6] common: move standard C fixed width type declarations to common header


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 16 Feb 2023 08:47:52 +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=v8ETtXwk3IN3tu3mdPSVaAcbxc+S7agoQVu+6VvmJRs=; b=ZPXqCuTSm5rwu1vl+Z/CEDmo6903TRZiBXY1VcHX5qvmoBHkOTK+yTq6uUAZUO/p4aRjvjsxAdE/NNDSKqt55A+KJDCed+LAgYu14SRPAo8TMrMB5A/+drGyIjihVAk9fhllcsJm+mFOFcONwoAb8R/yoBsEm1Dwi8hu0/DnoWMyDXXTheCKtPphSeHiSwHkb5fOHIY0McnenJXPCJa+0wK/AXgX9YqFshmpM+90k2a/qKVwlizfJ39MAJRFkxXESJcsaPDzbzoak2FRYaT6VJ8k/Q5UKnqchD9em+u3htN7iIYvd0BqtVgxULUIrNIX5+Yeneak4d4GENUdgk8OjQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UpzxgHhzDda3ViUNKmamf4hGOoEY4U/9mMuOo9HJgsRAHYrhMazuyXjRwDIshkvCCGCE1b8uNhmA3oZosPQRhAo6ypu7SDrwh5cui2WjIUagqeYwgiThHf8ehZEZhzKuysisB9XShNR25eG/QRgUGcGRyVqzquvkapj/rwPMH/rWCUXr9fiiT+De+kXDdikH+BIgEhPynmbZ708DD/7YUgyh3ai6MLcogPP5+iJog76DBpYvYCoI5oCIKl/SLxhZe7unYsTmC8vJdFMh9KowjHwzOdDPx3RDjCvh0K7xJZUc5DG40e3P6PfjxxPBHhGEZfR8okToVKITzfU2cOHT6A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Bobby Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Daniel Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Thu, 16 Feb 2023 07:48:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.02.2023 19:54, Andrew Cooper wrote:
> On 09/02/2023 10:38 am, Jan Beulich wrote:
>> Have these in one place, for all architectures to use. Also use the C99
>> types as the "original" ones, and derive the Linux compatible ones
>> (which we're trying to phase out). For __s<N>, seeing that no uses exist
>> anymore, move them to a new Linux compatibility header (as an act of
>> precaution - we don't have any uses of these types right now).
>>
>> Modern compilers supply __{,U}INT<n>_TYPE__ - use those if available.
>> Otherwise fall back to using "mode" attributes, but this can be relied
>> upon only when bytes are 8 bits wide. Should there ever be a port to an
>> architecture not matching this, it would need to define the fixed width
>> types locally by some other means.
> 
> These types were added in GCC 4.5.  It is 12 years old.  We even use a
> newer C standard than this compiler...

A newer C standard? We're using C99, don't we? And Xen, at this point,
continues to build fine with gcc 4.3. Furthermore I for one didn't
check when Clang gained support for these pre-defs ...

> At this point, it is an unreasonable burden to be continuing to support
> compilers this obsolete, not to mention that the mode attributes are
> unreadable to anyone who isn't a GCC developer and clearly unnecessary
> to begin with.

I disagree about the rant regarding mode attributes, but that's secondary.
What I'm really unhappy about is for this work to grow a dependency on the
long-standing question of what to update our tool chain baseline to. This
has been discussed many times, but there was never a concrete proposal on
a policy that we could use not only now, but also going forward. As it
stands I can't help the impression that this is going to remain unresolved
for an extended period of time. But there not being an appropriate
solution to that other issue shouldn't block the work here. Once that one
is resolved (and provided it's then acceptable also on the Clang side),
we could easily drop the mode attribute fallbacks again.

Jan



 


Rackspace

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