egcs-971225 bug report
David Binderman
davidb@msi-uk.com
Mon Jan 12 09:11:00 GMT 1998
Hello there,
For the following code on DEC Alpha
template <class T>
class S
{
private:
T val;
public:
S() : val() {}; // <<< line 8
};
class U {
public:
U();
};
void
f()
{
S<U> a;
S<int> b;
}
I get
hw92.cc: In method `S<int>::S()':
hw92.cc:8: Error: incomplete initializer for member `S<int>::val' of class `S<int>' which has no constructor
davidb@decalpha:438:
Odd. I've tried three C++ compilers on this code, from reputable manufacturers,
and all the other three were happy with this code.
Why on earth would egcs-971225 think that int didn't have a
default constructor ?
Regards
David C Binderman MSc BSc (Hons) +44 171 971 8765
contracting at Mobile Systems International in the Docklands, London, England
More information about the Gcc-bugs
mailing list