0
,有没有人遇到下列错误配备了GCC 3.4,升压1.34.1 有冲突的代码是沿着线:与海湾合作委员会的std :: map.find 3.4内部编译器错误
class Symbol
{
/// ...
bool operator<(const Symbol& rhs) const;
};
typedef boost::function< double(const XYZ::Date&) > F;
typedef std::map<Symbol, F> M;
M aMap; // properly instantiated
Symbol s; // properly instantied
M::const_iterator it = aMap.find(s); // dies in this call, see below
Symbol.h :97引用布尔运算符<(常量符号&)const成员函数, 比较两个Symbol类型实例。这在所有编译器上都可以正常工作,除了gcc 3.4 ,它会导致以下内部编译器错误。
/XYZ/include/XYZ/AAA/Type/Symbol.h:97:内部编译器错误:在gen_subprogram_die,在dwarf2out.c:11278
我一直试图找到任何指针上述原因导致网络失败,但无法找到任何解决方案。有没有人通过任何改变遇到这种情况?或者有人指出为什么gcc编译器在那一刻死亡?
感谢您的任何帮助。
/XYZ/AAA/Type/Symbol.h: In member function `bool XYZ::Symbol::operator<(const XYZ::Symbol&) const':
/XYZ/AAA/Type/Symbol.h:97:
instantiated from `bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = XYZ::Symbol]'
/usr/local/include/c++/3.4.5/bits/stl_tree.h:1125:
instantiated from
`typename std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::find(const _Key&) const
[with
_Key = XYZ::Symbol,
_Val = std::pair<const XYZ::Symbol, boost::function<double()(const XYZ::Date&), std::allocator<void> > >,
_KeyOfValue = std::_Select1st<std::pair<const XYZ::Symbol, boost::function<double()(const XYZ::Date&), std::allocator<void> > > >,
_Compare = std::less<XYZ::Symbol>,
_Alloc = std::allocator<std::pair<const XYZ::Symbol, boost::function<double()(const XYZ::Date&), std::allocator<void> > > >
]'
/usr/local/include/c++/3.4.5/bits/stl_map.h:513:
instantiated from
`typename std::_Rb_tree<_Key, std::pair<const I, T>, std::_Select1st<std::pair<const I, T> >, _Compare, _Alloc>::const_iterator std::map<_Key, _Tp, _Compare, _Alloc>::find(const _Key&) const
[with
_Key = XYZ::Symbol,
_Tp = boost::function<double()(const XYZ::Date&), std::allocator<void> >,
_Compare = std::less<XYZ::Symbol>,
_Alloc = std::allocator<std::pair<const XYZ::Symbol, boost::function<double()(const XYZ::Date&), std::allocator<void> > > >
]'
AFunc.cpp:70: instantiated from here
/XYZ/include/XYZ/AAA/Type/Symbol.h:97: internal compiler error: in gen_subprogram_die, at dwarf2out.c:11278
gcc 3.4.5于2005年发布(7年多前),为什么你没有升级? – 2012-04-26 04:12:59
@JesseGood:也许是因为OP不是一个决定... – 2012-04-26 08:24:00