OONumerics User :

From: Vivien Mallet (Vivien.Mallet_at_[hidden])
Date: 2005-03-05 10:37:13


 Hi,

> I have updated my OS to Fedora Core 3, before I had Red Hat 9.0.
> In this new OS the gcc version is 3.4.2. Trying to compile a program in c++
> with this new compiler version I got a lot of troubles. In my program I'm
> using templated clases, inheritance and static polymorfism (using Curiosly
> Recurring Template Pattern by Barton and Nackman). My main problem is with
> this latter feature, the compiler complains with the use of protected
> variables defined in base clases and used in derived clases (undefined
> variable it says).
>
> Do you know if this new version of gcc have some other problems?
> It is good idea to use gcc 3.4.2?

 You are supposed to refer to a variable "x" (declared in the base class) with
"this->x" in the derived class. I suspect that you did not insert "this->".
If you refer to "x" only, it is assumed that you refer to "x" as declared in
the derived class, and if "x" is not declared in the derived class, gcc says
it is undefined...
 For details about changes introduced in gcc 3.4.x, read:
http://gcc.gnu.org/gcc-3.4/changes.html
 They claim that: "G++ is now much closer to full conformance to the ISO/ANSI
C++ standard." Which is true. So it is not only a good idea to use gcc 3.4,
but also recommended!

 Regards,
 Vivien Mallet.