LWN.net Logo

Day: GNOME OS

Day: GNOME OS

Posted Aug 10, 2012 17:02 UTC (Fri) by slashdot (guest, #22014)
In reply to: Day: GNOME OS by jwakely
Parent article: Day: GNOME OS

Except that I'm pretty sure auto or foreach required --std=c++11 to be used, which also resulted in some macros getting defined (__GXX0X_EXPERIMENTAL__ or something like that), which in turn changed the size of std::list in the STL headers due to an #ifdef.

As far as I can tell, this is what they fixed in GCC 4.7.2 (apparently by reverting the changes, with a plan to make it a separate switch along with the ability of C++98 and C++11 ABIs to coexist), and the rubbish is the one you just spouted.

I'm not sure who the "idiot" was, but I remember reading in GCC bugzilla someone who argued that the situation described above was totally fine, while any reasonable person would instead think that it had to be avoided at any cost, as they fortunately did later.

Obviously someone who does that definitely deserves to be insulted, since he first insulted and damaged all its users with such a decision.


(Log in to post comments)

Day: GNOME OS

Posted Aug 10, 2012 17:25 UTC (Fri) by nix (subscriber, #2304) [Link]

Sheesh. You just don't take a hint, do you? The implementors of all this stuff - the mysterious impersonal 'they' you refer to -- are Paolo Carlini and Jon Wakely (y'know, the guy you're responding to). Neither of them are any sort of idiot, though I suspect from your failure to notice the authorship of these patches despite having received multiple direct links to them that *you* might need a major upgrade of your observational skill.

Day: GNOME OS

Posted Aug 10, 2012 17:38 UTC (Fri) by slashdot (guest, #22014) [Link]

Well, definitely they were idiots when they introduced the ABI change in question and defended it on Bugzilla etc.

Which is really hard to argue against, since they then had to revert the change in the middle of a stable series!

Anyway, I guess the important thing is that they returned to sanity, although obviously it would have been better for that to happen before releasing 4.7.0.

Day: GNOME OS

Posted Aug 10, 2012 17:50 UTC (Fri) by slashdot (guest, #22014) [Link]

BTW, the REAL idiots here are the guys in the C++ comittee who released a broken unimplementable standard (or alternatively, a standard without a full compatibility goal, which is even worse), despite having had 13 (!!!) years to fix it.

The gcc developers pretty much merely slavishly followed that idiocy without questioning, until they realized their mistake.

Day: GNOME OS

Posted Aug 10, 2012 18:30 UTC (Fri) by nix (subscriber, #2304) [Link]

Er, you do realise that the C++ Standard, following the original STL, has imposed time and space complexity constraints on various parts of the library for a very long time? They're essential, because those constraints are the only difference between some of the Standard's data structures.

This was just a new constraint, which was unfortunately incompatible with the existing implementation of the list<> in GCC, and it was impossible to change it without breaking backward compatibility. (One problem with templated data structures is that a lot of things you wouldn't expect to be ABI concerns actually are, because they are included in programs using them via template expansion.)

Deciding whether to violate the language standard or piss off your users is an unpleasant fork to be in -- but it's not the committee's fault either, because this sort of change is what language standard revisions have always done. C99 broke some valid C89 code: C11 breaks some more. It's just that the set of GCC-compiled code that got broken by a fully conformant implementation of the C++11 list<> was rather large...

Day: GNOME OS

Posted Aug 10, 2012 19:13 UTC (Fri) by slashdot (guest, #22014) [Link]

> This was just a new constraint, which was unfortunately incompatible with the existing implementation of the list<> in GCC, and it was impossible to change it without breaking backward compatibility

And that's the problem.

Adding the new constraint by the C++ committee was simply asinine, especially, since you lose O(1) list splicing (and you can keep the size yourself with C++98 std::list, but can't do O(1) splice yourself with C++11 std::list), and because at least one existing implementation could not provide it while keeping compatibility.

They should have added a new type if they wanted C++ to have a linked list with O(1) size().

BTW, they also broke multithreaded programs using std::list, since unless the size field is updated with atomics (which kills performance on several archs), it's no longer true that you can add to the head of a non-empty list in a thread and to the tail in another thread, which would work in C++98 libstdc++.

As for the GCC, I think it should need a separate option to enable ABI-breaking C++11 changes, and --std=c++11 should only enable the backwards compatible C++11 subset, which appears to be what they hint at in the recent announcement.

C++11 is not fully implemented anyway, so that's not an issue for now, and perhaps in the meantime the standard can be revised to revert the changes.

Day: GNOME OS

Posted Aug 10, 2012 19:28 UTC (Fri) by juliank (subscriber, #45896) [Link]

If I had to guess, I'd say that the O(1) size() thing was introduced to the standard by Microsoft.

Day: GNOME OS

Posted Aug 10, 2012 19:42 UTC (Fri) by juliank (subscriber, #45896) [Link]

OK, it seems to be pushed by Apple via proxy, not Microsoft, as far as I can tell.

Day: GNOME OS

Posted Aug 10, 2012 20:02 UTC (Fri) by foom (subscriber, #14868) [Link]

Slashdot: You've been told more than once to stop with such insulting. It is exceedingly inappropriate. Maybe it's expected behavior on your namesake website, but not here.

The change was a mistake, the defense of it was wrong. That STILL doesn't mean you get to call the people involved idiots.

Day: GNOME OS

Posted Aug 10, 2012 17:30 UTC (Fri) by ris (editor, #5) [Link]

> Obviously someone who does that definitely deserves to be insulted, since > he first insulted and damaged all its users with such a decision.

It is not at all obivious that anyone needs to be insulted just because they do something you disagree with. Please refrain from insulting people on this site. This is your second warning.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds