The following code, that compiles well with 3.3.4, doesn't compile with 3.4.2,
complaining that "toto" hasn't been declared.

template< typename T >
class Miyeu
{
public:

  T* toto;
};

template< typename T >
class Fin : public Miyeu< T >
{
public:
  int taille;

protected:
  void allouer( int p_taille )
  {
    if( p_taille > taille )
      {
        delete[] toto;
        toto = new T[p_taille];
        taille = p_taille;
      }
  }
};

-- 
           Summary: Use of parent's field in template classes
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: guillaume dot lemaitre33 at wanadoo dot fr
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18144

Reply via email to