Re: Xen reliance on non-standard GCC features

2023-06-09 Thread Bertrand Marquis
Hi, > On 9 Jun 2023, at 15:19, Julien Grall wrote: > > Hi Jan, > > On 09/06/2023 09: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: >>

Re: Xen reliance on non-standard GCC features

2023-06-09 Thread Julien Grall
Hi Jan, On 09/06/2023 09: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: You are right: here are a few examp

Re: Xen reliance on non-standard GCC features

2023-06-09 Thread Jan Beulich
On 09.06.2023 12:12, Michal Orzel wrote: > > > On 09/06/2023 11:47, Jan Beulich wrote: >> >> >> 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

Re: Xen reliance on non-standard GCC features

2023-06-09 Thread Michal Orzel
On 09/06/2023 11:47, Jan Beulich wrote: > > > 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:2

Re: Xen reliance on non-standard GCC features

2023-06-09 Thread Jan Beulich
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, Robert

Re: Xen reliance on non-standard GCC features

2023-06-09 Thread Michal Orzel
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: You are right: he

Re: Xen reliance on non-standard GCC features

2023-06-09 Thread Jan Beulich
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: >>> You are right: here are a few examples for U2: >>> >>> xen/arch/arm/cpuer

Re: Xen reliance on non-standard GCC features

2023-06-08 Thread Roberto Bagnara
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: You are right: here are a few examples for U2: xen/arch/arm/cpuerrata.c:92.12-92.35: empty initializer list (ill-formed for the C

Re: Xen reliance on non-standard GCC features

2023-06-07 Thread Jan Beulich
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: >>> U1) Use of _Static_assert in C99 mode. >>> >>> U2) Empty initialization lists, both in C99 mode (ARM64 and X86_64) >>> and C18 mode (only X86_64). >>> >>> U3)

Re: Xen reliance on non-standard GCC features

2023-06-06 Thread Jan Beulich
On 05.06.2023 23:39, Stefano Stabellini wrote: > On Mon, 5 Jun 2023, Roberto Bagnara wrote: Here is a list of extensions that are documented in the GCC manual: >>> >>> I suppose that this list wasn't meant to be complete? The most >>> prominent example is probably asm(). >> >> As far as I can

Re: Xen reliance on non-standard GCC features

2023-06-05 Thread Stefano Stabellini
On Mon, 5 Jun 2023, Roberto Bagnara wrote: > > > Here is a list of extensions that are documented in the GCC manual: > > > > I suppose that this list wasn't meant to be complete? The most > > prominent example is probably asm(). > > As far as I can tell the list was almost complete (I realize now

Re: Xen reliance on non-standard GCC features

2023-06-05 Thread Roberto Bagnara
On 05/06/23 11:28, Jan Beulich wrote: On 05.06.2023 07:28, Roberto Bagnara wrote: U1) Use of _Static_assert in C99 mode. U2) Empty initialization lists, both in C99 mode (ARM64 and X86_64) and C18 mode (only X86_64). U3) Returning void expressions. As per above, tiny extensions like th

Re: Xen reliance on non-standard GCC features

2023-06-05 Thread Jan Beulich
On 05.06.2023 14:15, Roberto Bagnara wrote: > On 05/06/23 10:58, Andrew Cooper wrote: >> On 05/06/2023 6:28 am, Roberto Bagnara wrote: >>> U10) \m escape sequence. >>> Is this an undocumented GCC extension or just a typo? >> >> Where are you seeing this? >> >> The only examples I see are in a

Re: Xen reliance on non-standard GCC features

2023-06-05 Thread Roberto Bagnara
On 05/06/23 10:58, Andrew Cooper wrote: On 05/06/2023 6:28 am, Roberto Bagnara wrote: U10) \m escape sequence. Is this an undocumented GCC extension or just a typo? Where are you seeing this? The only examples I see are in asm macros, and they're all parameter substitutions. This inclu

Re: Xen reliance on non-standard GCC features

2023-06-05 Thread Jan Beulich
On 05.06.2023 11:19, Roberto Bagnara wrote: > On 05/06/23 09:35, Jan Beulich wrote: >> On 05.06.2023 07:28, Roberto Bagnara wrote: >>> Finally, Xen seems to rely on explicitly undefined behavior, namely >>> C99 UB 58: "A structure or union is defined as containing no named >>> members (6.7.2.1)." A

Re: Xen reliance on non-standard GCC features

2023-06-05 Thread Jan Beulich
On 05.06.2023 07:28, Roberto Bagnara wrote: > It appears Xen uses lots of GCC features that are outside the C99 > standard. Some of them are documented GNU extensions to the language. > Some of them seem not to be documented, so they do not qualify > as language extensions (at least, not as far as

Re: Xen reliance on non-standard GCC features

2023-06-05 Thread Roberto Bagnara
On 05/06/23 09:35, Jan Beulich wrote: On 05.06.2023 07:28, Roberto Bagnara wrote: Finally, Xen seems to rely on explicitly undefined behavior, namely C99 UB 58: "A structure or union is defined as containing no named members (6.7.2.1)." All instances but one occur via macro BUILD_BUG_ON_ZERO, th

Re: Xen reliance on non-standard GCC features

2023-06-05 Thread Andrew Cooper
On 05/06/2023 6:28 am, Roberto Bagnara wrote: > U10) \m escape sequence. > Is this an undocumented GCC extension or just a typo? Where are you seeing this? The only examples I see are in asm macros, and they're all parameter substitutions. This includes the one in x86's bug.h where it's a p

Re: Xen reliance on non-standard GCC features

2023-06-05 Thread Jan Beulich
On 05.06.2023 07:28, Roberto Bagnara wrote: > Finally, Xen seems to rely on explicitly undefined behavior, namely > C99 UB 58: "A structure or union is defined as containing no named > members (6.7.2.1)." All instances but one occur via macro BUILD_BUG_ON_ZERO, > the remaining instance concerns str