From 25678a5700a2101ae4d642a325c4d0d984131acb Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Wed, 28 Apr 2010 08:50:23 +0000 Subject: [PATCH] Added BOOST_NO_COMPLETE_VALUE_INITIALIZATION to GCC < 4.4 (trunk), see #4080. [SVN r61642] --- include/boost/config/compiler/gcc.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index fe2c52ea..a4c23c36 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -69,6 +69,18 @@ # endif #endif +#if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 ) +// Previous versions of GCC did not completely implement value-initialization: +// GCC Bug 30111, "Value-initialization of POD base class doesn't initialize +// members", reported by Jonathan Wakely in 2006, +// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4) +// GCC Bug 33916, "Default constructor fails to initialize array members", +// reported by Michael Elizabeth Chastain in 2007, +// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4) +// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +#endif + #ifndef __EXCEPTIONS # define BOOST_NO_EXCEPTIONS #endif