avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] adding wrapper functions for new and delete operators


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] adding wrapper functions for new and delete operators
Date: Wed, 9 Feb 2011 22:11:52 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

As Bradley Jarvis wrote:

> The wrapper functions appear to work quite well and the class objects
> created with new do behave like one created using gcc for the x86 arch
> including running the constructor and destructor.

I've got only two concerns about that:

. This your email will get lost in outer space soon; don't miss to
  file a patch request as soon as the discussion here settled.  Please
  don't forget to patch the documentation (I think, at least the FAQ
  contains some remarks about the state of C++, so that should be
  updated).

. Where should those workarounds go to?  I'm not a C++ expert, but I
  think as new and delete are operators in C++, no particular header
  file is needed for them.  So, we could either add them to <stdlib.h>
  (which declares malloc() and friends for the C language), wrapped in
  #if defined __cplusplus brackets, or add a separate header file,
  like <compat/c++.h>, or something like that.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]