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]
Other format: [Raw text]

Re: Help: libstdc++-2.8.0 and malloc


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


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