5 ms·
GCC used C++98 from 4.8 to 10.x, IIRC subsequent releases are using a restricted subset of C++11. Thus it should be perfectly possible to jump from GCC4.7 to GC
by SubjectToChange 3y ago
GCC used C++98 from 4.8 to 10.x, IIRC subsequent releases are using a restricted subset of C++11. Thus it should be perfectly possible to jump from GCC4.7 to GCC10.5 (released this year) and it seems to be what they did here.
AFAIK mainline Linux currently has a minimum compiler requirement of GCC5.1, but even then the only reason for that version bump was to avoid compiler bugs in earlier versions. With a bit of patching and a restricted set of architectures it might be possible to continue using GCC4.7 for mainline Linux.
All that would not to be required if gcc was till a clean simple and plain C project,…
It cuts both ways. Linux and any other C project could avoid this if they remained compatible with tinycc, GCC4.7, or any other pure C compilers. Apparently such an expectation is out of the question, I suppose asm goto and friends are too appealing.
…moving gcc to c++ was probably one of the worst mistake in open source software history, if not the worst.
The decision to move GCC to C++98 was not taken lightly, nor was it done without opposition. I would recommend reading into the discussions on the topic. Moreover, I would also recommend browsing the source code of GCC4.7 and comparing it to later versions to see how much the transition genuinely simplified a lot of the codebase, e.g. the large scale replacement of preprocessor abuse.
At the end of the day, although it adds another step to the bootstrapping process it needed to be done to keep GCC development manageable.
- sylware 3y agoYep, roughly 2-3 gccs to compile in order to reach one able to build a linux kernel. I could compile a linux kernel with gcc 4.7 not a long time ago (disabling some features and unlocking gcc version). But they really added things which were too much a pain to workaround (if I recall properly, related to data/code alignments required by some assembly code, like the kernel entry code). I severely disagree, gcc code should have stayed plain and simple C (without the latest ISO abominations): the cure is worse than the disease. c++ is not a sane language, it should be jailed to closed source applications only, it is NEVER the solution. I think it should not be taught anymore as its syntax complexity is toxic for mind sanity.
- SubjectToChange 3y agoI severely disagree, gcc code should have stayed plain and simple C (without the latest ISO abominations):… If projects like Linux stuck to plain and simple C then it wouldn’t even matter what GCC was written in. The fact that Linux doesn’t even try to do so, and that it is hardly unique in that choice, suggests that maybe “plain and simple C” is not so practical. …the cure is worse than the disease. c++ is not a sane language, … it is NEVER the solution. I think it should not be taught anymore as its syntax complexity is toxic for mind sanity. I’ll never understand the withering criticism of C++ on the part of C programmers and/or C aficionados. For instance, suppose we take everything you say about C++ as true, then what does that say about C? Virtually anywhere C++ is used C could be used as well, and every line of C++ represents a choice to not write C. In other words the insanity of C++ is seen by many smart and serious people as better than C, including by the stewards of every major C compiler today. Ultimately knocking down C++ to build up C does nothing but make the C community look like dilettantes trying to convince themselves more than anyone else. The truth, as bitter as it may be, is that C++ genuinely scales and composes better than C. And C programmers know it too, at least on some level.
- sylware 3y agoHow could you compare the grotesque and absurd syntax complexity of c++ with C? Do you realize those are not on the same order of magnitude. It is reasonable to write a naive C compiler alternative with few resources (even a C compiler with a few basic optimizations passes is reasonable), and totally insane, at a pathological level, for a naive c++ compiler alternative. C is not better, it is less worse and its syntax is already way too complex. The less worse compromise, for now. If you cannot understand why many prefer to avoid using such language for those very reasons, and there are more (just browse the web), I am very sorry, I cannot do much more.
- SubjectToChange 3y agoI am keenly aware of how complex C++ is. It is reasonable to write a naive C compiler alternative with few resources… and totally insane, at a pathological level, for a naive c++ compiler alternative. Sure, but why should I, as a language end user, care about implementation difficulty? The fact that C prioritizes implementation simplicity over users is a grave sin, especially when in practice the vast majority of C programmers are using a vendor with substantial resources. Also, if C is so easy to implement, then it shouldn’t matter what Clang, GCC, ICC, MSVC, NVCC, IBM XL, etc, are implemented in, right? Just roll your own C compiler and bootstrap from that. The less worse compromise, for now. Languages are more than syntax. If you cannot understand why many prefer to avoid using such language for those very reasons,… I’m not saying anyone must like C++, nor is it any mystery why many do not. Now, if you can’t understand why many people choose C++, including the GCC developers, then I suggest you charitably evaluate their claims for doing so. …I am very sorry, I cannot do much more. Quite patronizing of you, but par for the course as far as Cnile rhetoric goes. Just know this, C may outlive us all but C++ will outlive C.