EGCS-1.1: sorry, not implemented: `array_ref' not supported by dump_type ???

Nathan Myers ncm@nospam.cantrip.org
Sat Sep 5 20:30:00 GMT 1998


Joerg Pommnitz wrote:
> 
> I get this strange error message for the following small program
> (it used to cause a sig 11 in EGCS-1.0.3):
> ...
> template <int i = 20> char *
> xx (const auto_ptr<char> &c = auto_ptr<char>(new char[i]))
> {
>     return strncpy (c.get (), "Hello World!", i);
> }

Incidentally, this code results in undefined behavior.  As noted
earlier in this newsgroup, auto_ptr<> uses regular "delete", not
"delete []", which is wrong.  (It might seem to work anyway; that
is actually worse than crashing.)

Nathan Myers
ncm@cygnus.com



More information about the Gcc mailing list