enum/template bug in egcs-1.0.2 and egcs-980328

Martin Dorey WVdevmt-WS mdorey@dev.madge.com
Tue May 12 06:52:00 GMT 1998


(I can't find this in the mailing list archive, so I'm resending)

Following code fails to compile on, at least, egcs-1.0.2 and egcs-980328.
It does compile on a gcc-2.7.2.1, a gcc 2.5.2 and MSVC5.0sp3.

egcs configuration (automatic host, manual target):
--host=i686-pc-linux-gnulibc1 --target=m68k-coff 

Mail me for more info.

template <class T>
struct U
{
        T mT;
};
 
template <class H>
struct M
{
        enum FLAG {On, Off};
        U<FLAG> mUF;
};
 
// With this uncommented, you get:
// monk.cpp:22: aggregate `struct M<char> gM' has incomplete type and cannot
be initialized
//struct M<char>;
 
// With it commented, you get:
// monk.cpp:22: invalid use of undefined type `enum M<H>::FLAG'
// monk.cpp:22: confused by earlier errors, bailing out
M<char> gM;

--
Martin Dorey




More information about the Gcc-bugs mailing list