This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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();
  }
};




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]