On Tue, Jul 02, 2019 at 05:01:33PM +0200, Christophe Lyon wrote: > On Mon, 1 Jul 2019 at 17:58, Kyrill Tkachov <kyrylo.tkac...@foss.arm.com> > wrote: > > +static tree > > +arm_data_attr (tree * node, > > + tree name, > > + tree args ATTRIBUTE_UNUSED, > > + int flags ATTRIBUTE_UNUSED, > > + bool * no_add_attrs ATTRIBUTE_UNUSED) > > +{ > > > > no_add_attrs is set in this function, so should not be ATTRIBUTE_UNUSED? > Right! Guess what? There's the same mistake in msp430.c :-)
This attribute means that parameter is *possibly* unused. It doesn't have to be. Now that we have C++ you could write this as static tree arm_data_attr (tree *node, tree name, tree /*args*/, int /*flags*/, bool */*no_add_attrs*/) { (or leave the names completely away where that makes sense), and then the parameter *has* to be unused (you *cannot* refer to it ;-) ) Segher