Here is another example where the strong attribute goes funny (this is reduced
from 23_containers/
vector/modifiers/swap.cc with -D_GLIBCXX_DEBUG on). This is a regression in
that we did not ICE
before. 3.4 also rejects the code too so the reject valid is not a regression
but fixing the the reject
valid will also fix the ICE.
namespace __gnu_debug_def { }
namespace std
{
using namespace __gnu_debug_def __attribute__ ((strong));
template<typename _Tp> class allocator {};
}
namespace __gnu_debug_def
{
template<typename _Tp,
typename _Allocator = std::allocator<_Tp> >
class vector
{
void
swap(vector<_Tp,_Allocator>& __x);
};
}
namespace std
{
template<> void
vector<int, allocator<int> >::swap(vector<int, allocator<int> >&) { }
}
--
Summary: [4.0 Regression] strong attribute is not strong enough
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19550