I have a situation where I want to change the value of the base class member fAddress when an old version of the derived class C is read from file. Class B and C also contain data members I don’t want to touch.
class C: public B {
};
class B: public A {
};
class A: public TObject {
Int_t fAddress;
};
Unfortunately your proposal does not solve the issue completely.
With the proposed change I don’t get the warning any longer.
When accessing the variable in the #pragma read statement it does not have the proper value stored in the file but has the value from the default constructor, which in my case is -1 to indicate problems.