Andrew Pinski (pinskia) <[email protected]> requested changes to the code:
Sorry I didn't notice the warning_at before.
Using warning without a location marker is definitely something which we are 
trying to avoid. Mostly because implict/explicit usage of input_location should 
go away as much as possible (this is not mentioned explictly except in a few 
bug reports/review; maybe it should be mentioned in the cleanup areas on the 
wiki).

> +++ gcc/gimplify.cc
> @@ -6647,0 +6656,4 @@
> +         else if (complete_p.padded_union
> +                  && warn_zero_init_padding_bits
> +                     >= ZERO_INIT_PADDING_BITS_UNIONS)
> +             warning (OPT_Wzero_init_padding_bits_,
Likewise about warning_at.

> +++ gcc/gimplify.cc
> @@ -6647,0 +6649,4 @@
> +       {
> +         if (complete_p.padded_non_union
> +             && warn_zero_init_padding_bits >= ZERO_INIT_PADDING_BITS_ALL)
> +             warning (OPT_Wzero_init_padding_bits_,
I think this should be warning_at and pass the location rather than depend on 
the input_location.

> +++ gcc/expr.h
> @@ -363,0 +365,4 @@
> +  /* True if the type being constructed has padding that definitely needs to 
> be
> +     zero-initialized, or some element of the constructor does not have a
> +     complete initializer, or both.  */
> +  bool sparse : 1;
I was going to say this should be BOOL_BITFIELD but that itself should be 
removed; filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125274 .


--
https://forge.sourceware.org/gcc/gcc-TEST/pulls/156#issuecomment-5854

Reply via email to