Thimo.Neubauer@xxxxxxx writes: > I concluded that > > class Foo { > public: > void bar(int x); > } __attribute__ ((deprecated)); > > should do the trick. However > > int main() { > Foo f; > > return 0; > }; > > only warns about the (obviously) unused variable but nothing else: Looks like a bug to me. And it's been filed already: http://gcc.gnu.org/PR16370 Interestingly, I do get a warning for this: struct Foo { int i; } __attribute__ ((deprecated)); void foo() { struct Foo f; } It matters whether I use "struct" or not. Which is bizarre. Ian