On Tue, Sep 03, 2024 at 01:59:45PM +0000, Qing Zhao wrote: > Hi, Jakub, > > I’d like to ping this simple patch again. It’s based on your suggestion in > PR116016 > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016#c28 > > Could you please take a look at the patch and let me know whether its okay > for committing to trunk?
Ok with a nit. > >> --- a/gcc/doc/extend.texi > >> +++ b/gcc/doc/extend.texi > >> @@ -7848,6 +7848,9 @@ The @code{counted_by} attribute may be attached to > >> the C99 flexible array > >> member of a structure. It indicates that the number of the elements of the > >> array is given by the field "@var{count}" in the same structure as the > >> flexible array member. > >> +This attribute is available only in C for now. > >> +In C++, this attribute is ignored by default, and the compiler issues a > >> +warning with @option{-Wattributes}. Just replace the last 2 lines with In C++ this attribute is ignored. Jakub