I seem to be having problems getting obsolete print alerts as functions are declared as virtual. I am using "g ++ (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30)". My research shows that in gcc 4.x there may be problems regarding the obsolescence of pure virtual functions (i.e. class bueller {virtual int cameron () = 0;};) but not ... I would suggest that you would called them regular ... virtual functions. We are just on the same page ...
foo.h
class Foo { void Foo_A() __attribute__((deprecated));
Say I compiled this, the foo.cpp file and some main.cpp file using g ++.
1) Everything that uses Foo_A () will actually display a warning.
2) Everything that uses Foo_B () does not show a warning.
3) Everything that Foo inherits, implements Foo_C, and then uses it, no warning is displayed.
Number 1: it works, no problem.
Number 3: seems like a known bug / feature .. anything ..
There seems to be no explanation for No. 2. Perhaps this is due to number 3, although nothing that I found does not mention this.
Does anyone know if I have missed something regarding the normal functions of a virtual class class that I want to denounce?
BTW: -Wno-deprecate is NOT included in my makefiles.
source share