Opened 10 years ago
Closed 10 years ago
#7898 closed Bugs (fixed)
TI compiller: wrong decision about type_info presence in boost/config
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | config |
Version: | Boost 1.52.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Hello!
When I try to include boost/static_assert.hpp on Texas Instruments compiler (TMS320C6x C/C++ Compiler v7.3.8) I get an error "... ../cots/boost/boost/config/suffix.hpp", line 574: error #284: the global scope has no "type_info"
There is a fault place:
// When BOOST_NO_STD_TYPEINFO is defined, we can just import // the global definition into std namespace: #if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus) #include <typeinfo> namespace std{ using ::type_info; } #endif
Source of issue is that boost incorrectly determines presence of type_info in std namespace:
boost/config/stdlib/dinkumware.hpp:
#include <typeinfo> #if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) # define BOOST_NO_STD_TYPEINFO #endif
At this moment my workaround is to add !defined(__TI_COMPILER_VERSION__) to condition above.
Previously I used boost 1.37 which has no "BOOST_NO_STD_TYPEINFO" section in dinkumware.hpp file.
TI has some specific config for boost (http://processors.wiki.ti.com/index.php/Building_and_Running_Boost_Code_with_the_C6000_Compiler). This issue takes place with these patches also.
(In [83006]) Apply patch from 7898. REfs #7898.