This is the mail archive of the gcc-bugs@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: bug with egs 1.1.1 release


> I previously had this error with an older egcs, so I got
> egcs-1.1.1.tar.gz from
> ftp://egcs.cygnus.com/pub/egcs/releases/index.html, I ran
> "configure" with no arguments, "make bootstrap" and "make install".

Thanks for your detailed bug report. I tried egcs-2.93.11 on, and it
doesn't crash on that code, so the bug seems to be fixed. I don't know
whether 1.1.2 has the fix, though.

Anyway, the compiler now reports (when compiling y.ii)

y.cc:4: ANSI C++ forbids declaration `auto_ptr' with no type
y.cc:4: template-id `auto_ptr<T>' used as a declarator
y.cc:4: parse error before `;'

There are two problems:

a) You didn't include <memory>, so the template std::auto_ptr isn't
   defined.
b) the compiler shouldn't crash if it isn't defined, unfortunately,
   1.1.1 crashes when you qualify a non-existant declaration with std::.
c) Even if you do include <memory>, you don't get std::auto_ptr,
   because that's not supported in egcs 1.1.1. The development
   snapshot does have that template. You could probably integrate it
   into 1.1.1 if you absolutely need to.

Hope this helps,
Martin


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