This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
g++ 3.5.0 and tree-ssa parse problem: incomplete types
- From: Kedar Namjoshi <kedar at research dot bell-labs dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Tue, 2 Mar 2004 18:33:14 -0500
- Subject: g++ 3.5.0 and tree-ssa parse problem: incomplete types
hello,
Compiling the code below with "g++ -c" fails with an error message
about incomplete types. This occurs only with the latest tree-ssa and
mainline versions. g++3.2.2 compiles the program successfully.
This seems to me to be a parser bug, unless it is somehow required by
the C++ standard. Could someone confirm? Please cc to my email address
as well.
thanks!
- Kedar
/* ----------------------- incompl.cc --------------------------- */
/* fails for tree-ssa [g++ (GCC) 3.5-tree-ssa 20040217 (merged 20040211)]
* and mainline [g++ (GCC) 3.5.0 20040217 (experimental)]
* with error message
*
* incompl.cc: In member function `int B<T>::f()':
* incompl.cc:17: error: incomplete type `A' used in nested name specifier
*/
class A; // forward decl.
template <class T> class B
{
public:
int f()
{
return A::get();
}
};