https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118043

--- Comment #3 from Alejandro Colomar <alx at kernel dot org> ---
(In reply to Andrew Pinski from comment #1)
>           /* The two specs designate different size arguments.  It's okay
>              for the explicit spec to specify a size where none is provided
>              by the implicit (VLA) one, as in:

Thanks for clarifying where the warning comes from.

>                __attribute__ ((access (read_write, 1, 2)))
>                void f (int*, int);
>              but not for two explicit access attributes to do that.  */

Where's this quote from?  I don't find that in the manual.

> 
> Looks like this is by design, you still need to supply the size argument to
> write_only.  Note this is not documented though.

Hmmm, considering that the compiler diagnoses when the sizes from the VLA and
the attribute do not match, I don't mind too much repeating myself.  I guess
it's okay.  Thanks!

Reply via email to