]> git.lyx.org Git - features.git/blobdiff - boost/boost/config/compiler/gcc.hpp
update boost to 1.44
[features.git] / boost / boost / config / compiler / gcc.hpp
index 6cae94cae679ef7f8705fce838613f1946477930..54f1bb9882b0032bb67c2326340de37b2d4f09da 100644 (file)
@@ -42,6 +42,7 @@
 #   define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
 #   define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
 #   define BOOST_NO_IS_ABSTRACT
+#   define BOOST_NO_EXTERN_TEMPLATE
 #elif __GNUC__ == 3
 #  if defined (__PATHSCALE__)
 #     define BOOST_NO_TWO_PHASE_NAME_LOOKUP
@@ -58,6 +59,7 @@
 #  if __GNUC_MINOR__ < 4
 #     define BOOST_NO_IS_ABSTRACT
 #  endif
+#  define BOOST_NO_EXTERN_TEMPLATE
 #endif
 #if __GNUC__ < 4
 //
 #  endif
 #endif
 
-#ifndef __EXCEPTIONS
+#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
+
+#if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
 # define BOOST_NO_EXCEPTIONS
 #endif
 
 #if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 )
 #define BOOST_HAS_NRVO
 #endif
+
+//
+// Dynamic shared object (DSO) and dynamic-link library (DLL) support
+//
+#if __GNUC__ >= 4
+#  if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+     // All Win32 development environments, including 64-bit Windows and MinGW, define 
+     // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment,
+     // so does not define _WIN32 or its variants.
+#    define BOOST_HAS_DECLSPEC
+#    define BOOST_SYMBOL_EXPORT __attribute__((dllexport))
+#    define BOOST_SYMBOL_IMPORT __attribute__((dllimport))
+#  else
+#    define BOOST_SYMBOL_EXPORT __attribute__((visibility("default")))
+#    define BOOST_SYMBOL_IMPORT
+#  endif
+#  define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))
+#else
+// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined  
+#  define BOOST_SYMBOL_EXPORT
+#endif
+
 //
 // RTTI and typeinfo detection is possible post gcc-4.3:
 //
 #if __GNUC__ * 100 + __GNUC_MINOR__ >= 403
 #  ifndef __GXX_RTTI
-#     define BOOST_NO_TYPEID
-#     define BOOST_NO_RTTI
+#     ifndef BOOST_NO_TYPEID
+#        define BOOST_NO_TYPEID
+#     endif
+#     ifndef BOOST_NO_RTTI
+#        define BOOST_NO_RTTI
+#     endif
 #  endif
 #endif
 
 // C++0x features not implemented in any GCC version
 //
 #define BOOST_NO_CONSTEXPR
-#define BOOST_NO_EXTERN_TEMPLATE
-#define BOOST_NO_LAMBDAS
 #define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
 #define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
 
 // C++0x features in 4.3.n and later
 //
 //
 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
 #  define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#  define BOOST_NO_LAMBDAS
+#  define BOOST_NO_RAW_LITERALS
+#  define BOOST_NO_UNICODE_LITERALS
 #endif
 
 // ConceptGCC compiler: