Re: [PATCH] c: Extend the -Wpadded message with actual padding size

2022-06-22 Thread Andrew Pinski via Gcc-patches
On Wed, Jun 22, 2022 at 1:34 AM Vit Kabele wrote: > > Hello, > > On Mon, Jun 20, 2022 at 04:05:17PM -0700, Andrew Pinski wrote: > > > new file mode 100644 > > > index 000..e8f1044a36b > > > --- /dev/null > > > +++ b/gcc/testsuite/c-c++-common/Wpadded.c > > > @@ -0,0 +1,10 @@ > > > +/* {

Re: [PATCH] c: Extend the -Wpadded message with actual padding size

2022-06-22 Thread Vit Kabele
Hello, On Mon, Jun 20, 2022 at 04:05:17PM -0700, Andrew Pinski wrote: > > new file mode 100644 > > index 000..e8f1044a36b > > --- /dev/null > > +++ b/gcc/testsuite/c-c++-common/Wpadded.c > > @@ -0,0 +1,10 @@ > > +/* { dg-do compile } */ > > +/* { dg-options "-Wpadded" } */ > > + > > +/* >

Re: [PATCH] c: Extend the -Wpadded message with actual padding size

2022-06-20 Thread Andrew Pinski via Gcc-patches
ite the test properly formatted > (i.e. not on a single line), please let me know. > > -- >8 -- > Subject: [PATCH] c: Extend the -Wpadded message with actual padding size > > When the compiler warns about padding struct to alignment boundary, it > now also informs the us

Re: [PATCH] c: Extend the -Wpadded message with actual padding size

2022-06-20 Thread Vit Kabele
t;8 -- Subject: [PATCH] c: Extend the -Wpadded message with actual padding size When the compiler warns about padding struct to alignment boundary, it now also informs the user about the size of the alignment that needs to be added to get rid of the warning. This removes the need of using pah

Re: [PATCH] c: Extend the -Wpadded message with actual padding size

2022-06-17 Thread Marek Polacek via Gcc-patches
On Thu, Jun 16, 2022 at 09:37:32PM +0200, Vit Kabele wrote: > When the compiler warns about padding struct to alignment boundary, it > now also informs the user about the size of the alignment that needs to > be added to get rid of the warning. > > This removes the need of using pahole or similar

Re: [PATCH] c: Extend the -Wpadded message with actual padding size

2022-06-17 Thread Eric Gallager via Gcc-patches
On Thu, Jun 16, 2022 at 3:37 PM Vit Kabele wrote: > > When the compiler warns about padding struct to alignment boundary, it > now also informs the user about the size of the alignment that needs to > be added to get rid of the warning. Hi, thanks for taking the time to improve -Wpadded; I have

[PATCH] c: Extend the -Wpadded message with actual padding size

2022-06-16 Thread Vit Kabele
When the compiler warns about padding struct to alignment boundary, it now also informs the user about the size of the alignment that needs to be added to get rid of the warning. This removes the need of using pahole or similar tools, or manually determining the padding size. Tested on