You can no longer use types like 'jint' together with libstdc++ containers as the fix for PR30293 disallows placement new of types that have TYPE_FOR_JAVA set. Now, the gcj/javaprims.h header has
extern "Java" { typedef __java_byte jbyte; typedef __java_short jshort; typedef __java_int jint; typedef __java_long jlong; typedef __java_float jfloat; ... etc., which is unfortunate, as this results in (from pdftk build): g++ pdftk.cc -I../java_libs -O2 -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -fdollars-in-identifiers -DPDFTK_VER=\"1.41\" -c /usr/include/c++/4.3/ext/new_allocator.h: In member function 'void __gnu_cxx::new_allocator<_Tp>::construct(_Tp*, const _Tp&) [with _Tp = __java_int]': /usr/include/c++/4.3/bits/stl_tree.h:368: instantiated from 'std::_Rb_tree_node<_Val>* std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_create_node(const _Val&) [with _Key = __java_int, _Val = __java_int, _KeyOfValue = std::_Identity<__java_int>, _Compare = std::less<__java_int>, _Alloc = std::allocator<__java_int>]' /usr/include/c++/4.3/bits/stl_tree.h:852: instantiated from 'typename std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_(const std::_Rb_tree_node_base*, const std::_Rb_tree_node_base*, const _Val&) [with _Key = __java_int, _Val = __java_int, _KeyOfValue = std::_Identity<__java_int>, _Compare = std::less<__java_int>, _Alloc = std::allocator<__java_int>]' /usr/include/c++/4.3/bits/stl_tree.h:1148: instantiated from 'std::pair<typename std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(const _Val&) [with _Key = __java_int, _Val = __java_int, _KeyOfValue = std::_Identity<__java_int>, _Compare = std::less<__java_int>, _Alloc = std::allocator<__java_int>]' /usr/include/c++/4.3/bits/stl_set.h:383: instantiated from 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename _Alloc::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const _Key&) [with _Key = __java_int, _Compare = std::less<__java_int>, _Alloc = std::allocator<__java_int>]' pdftk.cc:1355: instantiated from here /usr/include/c++/4.3/ext/new_allocator.h:108: error: Java class '__java_int' object allocated using placement new Can we restrict this placement new restriction to types that would need a constructor please? -- Summary: [4.3 Regression] placement new with primitive Java types rejected Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: blocker Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34829