[Prev][Next][Index]
sage unhappy about data member forward defs
- To: sage-bugs@extreme.indiana.edu
- Subject: sage unhappy about data member forward defs
- Date: Tue, 25 Apr 1995 15:06:47 -0700
- From: Lars Thomas Hansen <lth@cs.uoregon.edu>
- Sender: owner-sage-bugs@extreme.indiana.edu
The pc++ parser barfs at the following, which I think is valid:
class foo {
public:
void *ILUMostSpecificObject () { return (this->ILUMostSpecificObj); };
void ILUSetMostSpecificObject( void *o ) { this->ILUMostSpecificObj = o; };
private:
void *ILUMostSpecificObj;
};
main()
{
}
with the error message:
blackrabbit(436) % pc++ bug2.pc
Error on line 3 of bug2.pc: Internal Err 'This' class/collection missing)
Error in pc++ while executing:
-------> pC++2dep TEMP_pC++.C
but is happy with the equivalent code:
class foo {
void *ILUMostSpecificObj;
public:
void *ILUMostSpecificObject () { return (this->ILUMostSpecificObj); };
void ILUSetMostSpecificObject( void *o ) { this->ILUMostSpecificObj = o; };
};
main()
{
}
Looks like the forward declaration of the data member causes a problem.
--lars