This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

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


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


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