[PATCH v7] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

Marek Polacek polacek@redhat.com
Tue Nov 9 20:23:33 GMT 2021


On Tue, Nov 09, 2021 at 08:57:48PM +0100, Bernhard Reutner-Fischer wrote:
> On Tue, 9 Nov 2021 20:47:02 +0100
> Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote:
> 
> > On Tue, 9 Nov 2021 14:17:14 -0500
> > Marek Polacek <polacek@redhat.com> wrote:
> > 
> > > +      if (!valid_p (vendor_start, vendor_len)
> > > +	  || !valid_p (attr_start, attr_len))
> > > +	{
> > > +	  error ("wrong argument to ignored attributes");
> > > +	  continue;
> > > +	}
> > > +      canonicalize_attr_name (vendor_start, vendor_len);
> > > +      /* We perform all this hijinks so that we don't have to copy OPT.  */
> > > +      tree vendor_id = get_identifier_with_length (vendor_start, vendor_len);  
> > 
> > [[____::attry]] void f17y(); /* { dg-warning "ignored" } */
> > 
> > so i'd maybe put the
> > || !canonicalize_attr_name (vendor_start, vendor_len)
> > in the condition above?
> 
> Well no. Guess vendors and attribute just consisting of underscores
> will not be used that often anyway. I'd have required at least one
> alpha or at least alnum but whatever.
> thanks,

I see that -Wno-attributes=vendor::____ or -Wno-attributes=____::____
crashes, so I need to send yet another version to handle this.

*sigh*

Marek



More information about the Gcc-patches mailing list