Subject: [Boost-bugs] [Boost C++ Libraries] #4881: TI compiler: compiling with integer.hpp fails
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-11-22 16:01:31
#4881: TI compiler: compiling with integer.hpp fails
-----------------------------------------------------+----------------------
Reporter: Krzysztof Czainski <1czajnik@â¦> | Owner: dlwalker
Type: Bugs | Status: new
Milestone: To Be Determined | Component: integer
Version: Boost 1.45.0 | Severity: Problem
Keywords: |
-----------------------------------------------------+----------------------
Hello,
1.45.0 is the seventh version of boost, which I am successfully using with
a Texas Instruments compiler (actually, only some header-only parts of
boost).
However, for every new version of boost i must make this change in boost:
{{{
Index: integer.hpp
===================================================================
--- integer.hpp (revision 41)
+++ integer.hpp (working copy)
@@ -89,7 +89,8 @@
template <> struct exact_signed_base_helper<sizeof(int)* CHAR_BIT> {
typedef int exact; };
template <> struct exact_unsigned_base_helper<sizeof(unsigned int)*
CHAR_BIT> { typedef unsigned int exact; };
#endif
-#if ULONG_MAX != UINT_MAX
+#if ULONG_MAX != UINT_MAX && ( !defined __TI_COMPILER_VERSION__ || \
+ ( __TI_COMPILER_VERSION__ >= 7000000 && !defined
__TI_40BIT_LONG__ ) )
template <> struct exact_signed_base_helper<sizeof(long)* CHAR_BIT> {
typedef long exact; };
template <> struct exact_unsigned_base_helper<sizeof(unsigned long)*
CHAR_BIT> { typedef unsigned long exact; };
#endif
}}}
The change is needed in order to avoid compilation errors about redefined
exact_[un]signed_base_helper.
The condition
{{{
( !defined __TI_COMPILER_VERSION__ || \
( __TI_COMPILER_VERSION__ >= 7000000 && !defined
__TI_40BIT_LONG__ ) )
}}}
excludes cases, where sizeof(long)==8, but long the compiler treats it as
a 40-bit integer.
So I thought maybe this could be resolved once and for all ;-)
Cheers Kris
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4881> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC