Re: [PATCH] expr, c, gimplify, v3: Don't clear whole unions [PR116416]

2024-11-28 Thread Richard Biener
On Tue, Oct 15, 2024 at 7:59 PM Jakub Jelinek wrote: > > Hi! > > Here is an updated version of the patch. > > My reading of C23 is that if some aggregate field is initialized with > {} (which is supposed to newly clear padding bits) and then its > subobjects are overridden with designated initiali

Re: [PATCH] expr, c, gimplify, v3: Don't clear whole unions [PR116416]

2024-11-20 Thread Joseph Myers
On Wed, 20 Nov 2024, Jakub Jelinek wrote: > On Tue, Nov 19, 2024 at 11:08:03PM +, Joseph Myers wrote: > > > --- gcc/testsuite/gcc.dg/gnu11-empty-init-1.c.jj 2024-10-15 > > > 16:14:23.411063701 +0200 > > > +++ gcc/testsuite/gcc.dg/gnu11-empty-init-1.c 2024-10-15 > > > 16:31:02.302984714

Re: [PATCH] expr, c, gimplify, v3: Don't clear whole unions [PR116416]

2024-11-20 Thread Jakub Jelinek
On Tue, Nov 19, 2024 at 11:08:03PM +, Joseph Myers wrote: > > --- gcc/testsuite/gcc.dg/gnu11-empty-init-1.c.jj2024-10-15 > > 16:14:23.411063701 +0200 > > +++ gcc/testsuite/gcc.dg/gnu11-empty-init-1.c 2024-10-15 > > 16:31:02.302984714 +0200 > > @@ -0,0 +1,199 @@ > > +/* Test GNU C11

Re: [PATCH] expr, c, gimplify, v3: Don't clear whole unions [PR116416]

2024-11-19 Thread Joseph Myers
On Tue, 15 Oct 2024, Jakub Jelinek wrote: > --- gcc/testsuite/gcc.dg/gnu11-empty-init-1.c.jj 2024-10-15 > 16:14:23.411063701 +0200 > +++ gcc/testsuite/gcc.dg/gnu11-empty-init-1.c 2024-10-15 16:31:02.302984714 > +0200 > @@ -0,0 +1,199 @@ > +/* Test GNU C11 support for empty initializers. */

[PATCH] expr, c, gimplify, v3: Don't clear whole unions [PR116416]

2024-10-15 Thread Jakub Jelinek
Hi! Here is an updated version of the patch. My reading of C23 is that if some aggregate field is initialized with {} (which is supposed to newly clear padding bits) and then its subobjects are overridden with designated initializers, then the padding bits are cleared property should be kept unle