--- ./configure.ac	2010-06-17 06:03:27.000000000 +1000
+++ ./configure.ac	2011-02-17 12:56:26.000000000 +1100
@@ -129,6 +129,7 @@ CFLAGS=""
 # Checks for programs.
 
 AC_PROG_CC
+AC_PROG_CXX
 AC_CHECK_TOOL(AS, as, as)
 AM_PROG_AS
 AC_PROG_RANLIB
--- ./devtools/Architecture.am	2010-06-17 06:03:06.000000000 +1000
+++ ./devtools/Architecture.am	2011-02-17 12:41:23.000000000 +1100
@@ -1,5 +1,6 @@
 # Copyright (c) 2004,  Theodore A. Roth
 # Copyright (c) 2005, 2008, 2009  Anatoly Sokolov
+# Copyright (c) 2011 Bradley Jarvis
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -49,9 +50,12 @@ AM_CPPFLAGS = -I$(top_srcdir)/common -I$
 
 AVRLIB_CFLAGS = -g -Wall -W -Wstrict-prototypes -mmcu=$(AVR_TARGET) $(AVR_TARGET_DEFS) $(AVR_TARGET_CFLAGS)
 
+AVRLIB_CXXFLAGS = -g -Wall -W -mmcu=$(AVR_TARGET) $(AVR_TARGET_DEFS) $(AVR_TARGET_CFLAGS)
+
 AVRLIB_ASFLAGS = -x assembler-with-cpp -Wa,-gstabs -mmcu=$(AVR_TARGET) $(AVR_TARGET_DEFS) $(AVR_TARGET_ASFLAGS)
 
 AM_CFLAGS = $(AVRLIB_CFLAGS)
+AM_CXXFLAGS = $(AVRLIB_CXXFLAGS)
 AM_CCASFLAGS = $(AM_CPPFLAGS) $(AVRLIB_ASFLAGS)
 
 __install_dir = $(prefix)/avr/lib/$(AVR_INSTALL_DIR)
@@ -76,6 +80,7 @@ include $(top_srcdir)/libm/fplib/Rules.a
 
 nodist_libc_a_SOURCES = \
 	$(stdlib_a_c_sources) \
+	$(stdlib_a_cxx_sources) \
 	$(stdlib_a_asm_sources) \
 	$(pmstring_a_c_sources) \
 	$(pmstring_a_asm_sources) \
@@ -104,4 +109,4 @@ else
 
 echo all distdir install installdirs clean distclean uninstall check:
 
-endif
\ No newline at end of file
+endif
--- ./devtools/Device.am	2010-06-17 06:03:06.000000000 +1000
+++ ./devtools/Device.am	2011-02-17 12:41:06.000000000 +1100
@@ -1,5 +1,6 @@
 # Copyright (c) 2004,  Theodore A. Roth
 # Copyright (c) 2005, 2008  Anatoly Sokolov
+# Copyright (c) 2011, Bradley Jarvis
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -43,9 +44,12 @@ AM_CPPFLAGS = -I$(top_srcdir)/common -I$
 
 AVRLIB_CFLAGS = -gstabs -Wall -W -Wstrict-prototypes -mmcu=$(AVR_TARGET) $(AVR_TARGET_DEFS) $(AVR_TARGET_CFLAGS)
 
+AVRLIB_CXXFLAGS = -gstabs -Wall -W -mmcu=$(AVR_TARGET) $(AVR_TARGET_DEFS) $(AVR_TARGET_CFLAGS)
+
 AVRLIB_ASFLAGS = -x assembler-with-cpp -Wa,-gstabs -mmcu=$(AVR_TARGET) $(AVR_TARGET_DEFS) $(AVR_TARGET_ASFLAGS)
 
 AM_CFLAGS = $(AVRLIB_CFLAGS)
+AM_CXXFLAGS = $(AVRLIB_CXXFLAGS)
 AM_CCASFLAGS = $(AM_CPPFLAGS) $(AVRLIB_ASFLAGS)
 
 
--- ./doc/api/faq.dox	2010-06-17 06:03:19.000000000 +1000
+++ ./doc/api/faq.dox	2011-02-17 13:02:58.000000000 +1100
@@ -251,9 +251,6 @@ compiled.  Among them are:
 - Obviously, none of the C++ related standard functions, classes,
   and template classes are available.
 
-- The operators \c new and \c delete are not implemented, attempting
-  to use them will cause the linker to complain about undefined
-  external references.  (This could perhaps be fixed.)
 
 - Some of the supplied include files are not C++ safe, i. e. they need
   to be wrapped into \code extern "C" { . . . } \endcode
@@ -265,8 +261,13 @@ compiled.  Among them are:
   this, the linker will complain about an undefined external
   reference to \c __gxx_personality_sj0.
 
-Constructors and destructors \e are supported though, including global
-ones.
+What is currently supported:
+
+- Constructors and destructors  including global ones.
+
+- The operators \c new and \c delete are also implemented, they do not
+  however support execeptions. They are located in libc in stdlib
+  and are wrappers for malloc and free.
 
 When programming C++ in space- and runtime-sensitive environments like
 microcontrollers, extra care should be taken to avoid unwanted side
--- ./libc/stdlib/Files.am	2010-06-17 06:03:22.000000000 +1000
+++ ./libc/stdlib/Files.am	2011-02-17 12:39:42.000000000 +1100
@@ -50,6 +50,9 @@ stdlib_a_c_sources = \
 	dtoa_conv.h \
 	stdlib_private.h
 
+stdlib_a_cxx_sources = \
+	new.cc
+
 stdlib_a_asm_sources = \
 	abort.S \
 	atof.S \
--- ./libc/stdlib/Makefile.am	2010-06-17 06:03:22.000000000 +1000
+++ ./libc/stdlib/Makefile.am	2011-02-17 12:39:58.000000000 +1100
@@ -33,5 +33,6 @@ include $(top_srcdir)/libc/stdlib/Files.
 
 EXTRA_DIST = \
 	$(stdlib_a_c_sources) \
+	$(stdlib_a_cxx_sources) \
 	$(stdlib_a_asm_sources) \
 	$(stdlib_a_extra_dist)
--- ./libc/stdlib/new.cc	1970-01-01 10:00:00.000000000 +1000
+++ ./libc/stdlib/new.cc	2011-02-17 12:40:20.000000000 +1100
@@ -0,0 +1,60 @@
+/* Copyright (c) 2011, Bradley Jarvis
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+   * Neither the name of the copyright holders nor the names of
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE. */
+
+#include <stdlib.h>
+#include "sectionname.h"
+
+
+// wrapper functions for malloc and free so that the c++ operators new and
+// delete work, these functions will not throw an exception
+
+
+ATTRIBUTE_CLIB_SECTION
+void* operator new(size_t __s)
+{
+	return malloc(__s);
+}
+
+ATTRIBUTE_CLIB_SECTION
+void* operator new[](size_t __s) 
+{
+	return malloc(__s);
+}
+
+ATTRIBUTE_CLIB_SECTION
+void operator delete(void* __p)
+{
+	if (__p) free(__p);
+}
+
+ATTRIBUTE_CLIB_SECTION
+void operator delete[](void* __p)
+{
+	if (__p) free(__p);
+}
+
