This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: EGCS-1.1: sorry, not implemented: `array_ref' not supported by dump_type ???
- To: egcs at cygnus dot com
- Subject: Re: EGCS-1.1: sorry, not implemented: `array_ref' not supported by dump_type ???
- From: Nathan Myers <ncm at nospam dot cantrip dot org>
- Date: Sat, 05 Sep 1998 19:06:16 -0700
- Newsgroups: cygnus.egcs
- Organization: http://www.cantrip.org/
- References: <35EE88A8.378FA905.cygnus.egcs@darmstadt.gmd.de>
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