This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Help: libstdc++-2.8.0 and malloc
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "krish K" <kri1233 at rediffmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 18 Nov 2001 10:13:05 -0200
- Subject: Re: Help: libstdc++-2.8.0 and malloc
- Organization: GCC Team, Red Hat
- References: <20011109205645.22821.qmail@mailweb32.rediffmail.com>
On Nov 9, 2001, "krish K" <kri1233@rediffmail.com> wrote:
> am33 platform on linux 6.2 using gcc 2.95.3.
> If I define a class and use a "new" operator, it fails.
> Basically, anytime the malloc gets called, the program crashes.
> If I use "malloc" in a C program, everything works fine.
Make sure the translation unit that defines operator new sees a
declaration of malloc. The mn10300 ABI says that pointers are
returned in a0, whereas any other type is returned in d0/d1.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me