help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compilation problem when upgrading from g++ 3.3 to g++ 3.4


From: Alex Vinokur
Subject: Compilation problem when upgrading from g++ 3.3 to g++ 3.4
Date: Fri, 1 Oct 2004 10:27:40 +0200

Hi,

The code below has no problem with GNU g++ 3.3,
but it has a problem with GNU g++ 3.4.

What is reason for that?

--------- [C++] foo.cpp : BEGIN ---------
template <typename T>
struct Boo
{
  bool value_;
};

template <typename T>
struct Doo : public Boo<T>
{
  Doo () {value_ = false;}  // Line#10
};

int main()
{
Doo<int> inst;
  return 0;
}
--------- [C++] foo.cpp : END ---`--------



------ Compilation with GNU gcc 3.3 (Cygwin) : BEGIN ------

$ g++ --version
g++ (GCC) 3.3.3 (cygwin special)
[---omitted---]

$ g++ -W -Wall foo.cpp
// No errors/warnings

------ Compilation with GNU gcc 3.3 (Cygwin) : END --------



------ Compilation with GNU gcc 3.4 (DJGPP) : BEGIN ------

$ gpp --version
gpp.exe (GCC) 3.4.1
[---omitted---]


$ gpp -W -Wall foo.cpp
foo.cpp: In constructor `Doo<T>::Doo()':
foo.cpp:10: error: `value_' undeclared (first use this function)
foo.cpp:10: error: (Each undeclared identifier is reported only once for each
                   function it appears in.)


------ Compilation with GNU gcc 3.4 (DJGPP) : END --------

-- 
   Alex Vinokur
     http://mathforum.org/library/view/10978.html
     http://sourceforge.net/users/alexvn





reply via email to

[Prev in Thread] Current Thread [Next in Thread]