Re: [PATCH] xen: Use __auto_type

2025-05-12 Thread Andrew Cooper
On 13/05/2025 12:04 am, Demi Marie Obenour wrote: > On 5/12/25 2:25 PM, Elliott Mitchell wrote: >> On Mon, May 12, 2025 at 03:00:18PM +0200, Jan Beulich wrote: >>> On 12.05.2025 14:09, Andrew Cooper wrote: Now for the (new) controversial part. Since sending this, Linux has decided to jus

Re: [PATCH] xen: Use __auto_type

2025-05-12 Thread Demi Marie Obenour
On 5/12/25 2:25 PM, Elliott Mitchell wrote: > On Mon, May 12, 2025 at 03:00:18PM +0200, Jan Beulich wrote: >> On 12.05.2025 14:09, Andrew Cooper wrote: >>> >>> Now for the (new) controversial part. Since sending this, Linux has >>> decided to just #define auto __auto_type for C < 23, in order to s

Re: [PATCH] xen: Use __auto_type

2025-05-12 Thread Nicola Vetrini
On 2025-05-12 20:25, Elliott Mitchell wrote: On Mon, May 12, 2025 at 03:00:18PM +0200, Jan Beulich wrote: On 12.05.2025 14:09, Andrew Cooper wrote: > > Now for the (new) controversial part.  Since sending this, Linux has > decided to just #define auto __auto_type for C < 23, in order to start >

Re: [PATCH] xen: Use __auto_type

2025-05-12 Thread Elliott Mitchell
On Mon, May 12, 2025 at 03:00:18PM +0200, Jan Beulich wrote: > On 12.05.2025 14:09, Andrew Cooper wrote: > > > > Now for the (new) controversial part.  Since sending this, Linux has > > decided to just #define auto __auto_type for C < 23, in order to start > > writing C23 compatible code from now.

Re: [PATCH] xen: Use __auto_type

2025-05-12 Thread Jan Beulich
On 12.05.2025 14:09, Andrew Cooper wrote: > On 12/05/2025 12:59 pm, Jan Beulich wrote: >> On 05.05.2025 21:44, Stefano Stabellini wrote: >>> On Mon, 5 May 2025, Andrew Cooper wrote: In macros it is common to declare local variables using typeof(param) in order to ensure that side ef

Re: [PATCH] xen: Use __auto_type

2025-05-12 Thread Frediano Ziglio
On Mon, May 12, 2025 at 1:09 PM Andrew Cooper wrote: > > On 12/05/2025 12:59 pm, Jan Beulich wrote: > > On 05.05.2025 21:44, Stefano Stabellini wrote: > >> On Mon, 5 May 2025, Andrew Cooper wrote: > >>> In macros it is common to declare local variables using typeof(param) in > >>> order > >>> to

Re: [PATCH] xen: Use __auto_type

2025-05-12 Thread Andrew Cooper
On 12/05/2025 12:59 pm, Jan Beulich wrote: > On 05.05.2025 21:44, Stefano Stabellini wrote: >> On Mon, 5 May 2025, Andrew Cooper wrote: >>> In macros it is common to declare local variables using typeof(param) in >>> order >>> to ensure that side effects are only evaluated once. A consequence of

Re: [PATCH] xen: Use __auto_type

2025-05-12 Thread Jan Beulich
On 05.05.2025 21:44, Stefano Stabellini wrote: > On Mon, 5 May 2025, Andrew Cooper wrote: >> In macros it is common to declare local variables using typeof(param) in >> order >> to ensure that side effects are only evaluated once. A consequence of this >> is >> double textural expansion of the p

Re: [PATCH] xen: Use __auto_type

2025-05-05 Thread Stefano Stabellini
On Mon, 5 May 2025, Andrew Cooper wrote: > In macros it is common to declare local variables using typeof(param) in order > to ensure that side effects are only evaluated once. A consequence of this is > double textural expansion of the parameter, which can get out of hand very > quickly with nest

Re: [PATCH] xen: Use __auto_type

2025-05-05 Thread Andrew Cooper
On 05/05/2025 1:57 pm, Nicola Vetrini wrote: > On 2025-05-05 14:46, Andrew Cooper wrote: >> In macros it is common to declare local variables using typeof(param) >> in order >> to ensure that side effects are only evaluated once.  A consequence >> of this is >> double textural expansion of the para

Re: [PATCH] xen: Use __auto_type

2025-05-05 Thread Nicola Vetrini
On 2025-05-05 14:46, Andrew Cooper wrote: In macros it is common to declare local variables using typeof(param) in order to ensure that side effects are only evaluated once. A consequence of this is double textural expansion of the parameter, which can get out of hand very quickly with nested

[PATCH] xen: Use __auto_type

2025-05-05 Thread Andrew Cooper
In macros it is common to declare local variables using typeof(param) in order to ensure that side effects are only evaluated once. A consequence of this is double textural expansion of the parameter, which can get out of hand very quickly with nested macros. A GCC extension, __auto_type, is now