[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-13 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 --- Comment #15 from Michael Matz 2012-06-13 12:07:38 UTC --- I think so, yes. I initially really reported this as general c++ problem, with the testcase of course being about a concrete instance of the problem but not meaning to specifically co

[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-13 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 Paolo Carlini changed: What|Removed |Added CC||daniel.kruegler at |

[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-12 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 --- Comment #12 from Paolo Carlini 2012-06-12 16:12:55 UTC --- If I remember correctly, the last time I tried, default + is_constructible worked pretty well modulo testcases sensitive to access control under sfinae. But the latter we are going to

[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-12 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 --- Comment #11 from Paolo Carlini 2012-06-12 16:04:58 UTC --- Daniel should have all the details. It might be possible to do the change *together* with changing the constraining in the various container::insert to use is_constructible instead of

[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-12 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 --- Comment #10 from Michael Matz 2012-06-12 16:02:28 UTC --- Yep, defaulting that ctor changes the ABI back to register passing. If we could change that in libstdc++, all the better, but I still think the issue is larger than just this specific

[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-12 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 --- Comment #9 from Jonathan Wakely 2012-06-12 15:57:16 UTC --- Defaulting that move-ctor fixes the issue referred to in comment 1 too. I think we need to find out if that comment is still relevant and fix it if it is, so we can default the move

[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-12 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 Jonathan Wakely changed: What|Removed |Added CC||paolo.carlini at oracle dot

[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-12 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 --- Comment #7 from Jonathan Wakely 2012-06-12 15:50:05 UTC --- Trivially copyable is just one small part of the POD requirements. std::pair has always been non-POD, even in c++98, but in c++98 it is trivially copyable, in c++11 that move constru

[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-12 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 --- Comment #6 from Michael Matz 2012-06-12 15:41:49 UTC --- FWIW, it's finish_struct_bits setting TREE_ADDRESSABLE, because type_has_nontrivial_copy_init returns true for pair with that ctor. I think this indeed makes pair non-POD.

[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-12 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 --- Comment #5 from Michael Matz 2012-06-12 15:36:01 UTC --- (In reply to comment #2) > N.B. std::pair is not a POD in c++98 or c++11, so I don't know what libstdc++ > could have done to cause the FE to change how it returns a std::pair. I don't

[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-12 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 --- Comment #4 from Jonathan Wakely 2012-06-12 14:29:03 UTC --- (In reply to comment #3) > I don't think this is a libstdc++ issue, precompiling ... Sorry, brainfart, I meant preprocessing

[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-12 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 --- Comment #3 from Jonathan Wakely 2012-06-12 14:27:58 UTC --- I don't think this is a libstdc++ issue, precompiling the code with 4.7 and then compiling with 4.8 still segfaults, so it's a FE change not a libstdc++ change.

[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-12 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 --- Comment #2 from Jonathan Wakely 2012-06-12 14:19:33 UTC --- N.B. std::pair is not a POD in c++98 or c++11, so I don't know what libstdc++ could have done to cause the FE to change how it returns a std::pair.

[Bug libstdc++/53646] Surprising effects of cxx11 vs cxx98 ABI compatibility

2012-06-12 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646 --- Comment #1 from Jonathan Wakely 2012-06-12 13:38:01 UTC --- (In reply to comment #0) > In this specific case the problem is the Rb_tree::equal_range function, > which returns a pair, under cxx98 that's POD (returned via registers), under > c