This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


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

Incorrect behaviour of the compiler in C++


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

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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