This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Incorrect behaviour in C++
- To: <gcc-bugs at gcc dot gnu dot org>, <bug-gcc at gnu dot org>
- Subject: Incorrect behaviour in C++
- From: "robin 'xer.xes' putters" <robin at games dot lostboys dot com>
- Date: Tue, 29 Aug 2000 16:17:49 +0200
The following code should speak for itself. Looks like something goes wrong
with the way GCC is handling typedef's..
Is this a known bug? Is there a patch for it?
(btw. I've tried various compilers. 2.7.2.3 on linux, 2.91.something on
linux, 2.95.2 on playstation, windows (cygwin), and linux.)
//
// test.cpp(34) : conflicting types for `typedef const class ClsRef
constClsRef'
// test.cpp(29) : previous declaration as `typedef class Templ<Cls>
constClsRef'
//
//
// Just a class
//
class Cls;
//
// Just a template
//
template <typename taTYPE> class Templ;
//
//
//
typedef Templ<Cls> ClsRef;
//
// First forward declaration
//
typedef const ClsRef constClsRef;
//
// Second forward declaration
//
typedef const ClsRef constClsRef; // line 29
//
// Third forward declaration.
//
typedef const ClsRef constClsRef; // line 34
robin 'xer.xes' putters
lost boys games
robin@games.lostboys.com
test.cpp