On Fri, Nov 9, 2012 at 5:08 AM, Florian Weimer <fwei...@redhat.com> wrote: > On 11/08/2012 08:43 PM, Lubos Lunak wrote: > >> The patch implements an attribute for marking types for which gcc cannot >> on >> its own issue warnings about unused variables (e.g. because the ctor is >> external), but for which such a warning might be useful anyway (e.g. >> std::string). > > > I'm not sure if the default shouldn't be "warn". RAII-only classes which > are used purely for constructor/destructor side effects are pretty rare, > AFAICT. > > To make this useful with containers, we'd need further annotations to tell > read and write accesses apart. (A vector might be append-only, and the > elements might be ignored.) > > -- > Florian Weimer / Red Hat Product Security Team
I am also concerned that an idiomatic standard C++ program would need obscure annotations to silence GCC. -- Gaby