Hi Berin, > Guys, > > The gcc 2.95.4 autobuilder has been failing for a few days, giving the > (cut down) output at the base of this e-mail. > > I went in to have a look, and there is a constructor that uses a member > of the current class during initialisation of the base class. > > Looks very dangerous to me. My understanding is there is no requirement > for the compiler to allocate memory for class members prior to base > classes being initialised. (Generally they do, but...)
Not true. The memory for a class has already been allocated when the constructor has entered, since the object must be in contiguous memory. In the case of a built-in member, which has no constructor, there's really no problem with doing something like this. I don't know why GCC is complaining, as the code is perfectly legal (although it may not be terribly elegant). > Then on top of that, the code initialises m_matchScore after the value > is set in the NodeTest ctor. Hmmm, I don't see this in the code. I tested with stylesheets that expect the m_matchScore data member to have the correct value, and everything works fine. > I haven't committed a fix for this, because I don't fully understand > what this is trying to do - and I may be misunderstanding the > initialisation process. Not to worry -- I changed the code this weekend so m_matchScore is not set by the base class constructor. Tbanks! Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
