@petit it's GCC's fault for making non-standard extensions available in the first place. This extends to GNU as a whole, it's a really shit habit they have and the entire computer science ecosystem suffers under the heel of their garbage
@petit @Shamar @xj9 even if the default were C89, GNU's C89 is not C89, it's C89+dozens of GNU extensions you can't turn off. You would be surprised how easy it is to use GNU extensions, they're everywhere. And again - the most fundamental requirement, libc, uses them throughout, for any lib I can think of to look through.
long, on undefined behaviours, human sin, computing history and why people should read the C standard before blaming GCC
Are you sure?
Because the #C99 #standard say something different.
On section 3.4.3 the standard defines "undefined behaiour" as "behavior upon use of a nonportable or erroneous program construct or of erroneous data,for which this International Standard imposes no requirements"
The standard also clarify: "Possible undefined behavior ranges from ignoring the situation completely with unpredictable results, to behaving during translation or program execution in a documented manner characteristic of the environment (with or without the issuance of a diagnostic message), to terminating a translation or execution (with the issuance of a diagnostic message)."
In section 4, about Conformance, the #C standard says: "A program that is correct in all other aspects, operating on correct data, containing unspecified behavior shall be a correct program and act in accordance with 5.1.2.3"
And then add "A strictly conforming program shall use only those features of the language and library specified in this International Standard.2)It shall not produce output dependent on any unspecified, undefined, or implementation-defined behavior and shall not exceed any minimum implementation limit."
Note the wording used: in a STRICTLY conforming program the output must not depends on undefined behaviour, but it doesn't exclude undefined behaviours in a CORRECT program!
That's because C was designed as a low level language: undefined behaviour were basically hook for compiler designers.
So ultimately GCC is just handling undefined behaviour BY THE STANDARD.
And this way of handling undefined behaviour is not a C invention.
Algol 68 standard said:
"1.1.4.3. Undefined
a) If something is left “undefined” or is said to be “undefined”, then this means that it is not defined by this Report alone and that, for its definition, information from outside this Report has to be taken into account. {A distinction must be drawn between the yielding of an undefined value (whereupon elaboration continues with possibly unpredictable results) and the complete undefinedness of the further elaboration. The action to be taken in this latter case is at the discretion of the implementer, and may be some form of continuation (but not necessarily the same as any other implementer’s continuation), or some form of interruption (2.1.4.3.h) brought about by some run-time check.}
b) If some condition is “required” to be satisfied during some elaboration then, if it is not so satisfied, the further elaboration is undefined."
Don't blame GNU Compiler Collection!
It's just that we are all tightly coupled!
And we are all brothers, all subject to the original sin. ;-)
Yes, if that IS the case, you should be thankful to #Microsoft, be it a force for good or pure evil.
Also note that your third order exposure to GNU tools is what let your whole system EXIST.
I mean, yes, it's third order, but well... a pretty strong relationship, don't you think?
Not counting that, if sr.ht run on Intel hardware... you know Intel ME => Minix => GNU...
Now, don't get me wrong: I don't like GNU lack of design just like you do (probably more 🤣) and you should not like it if you don't.
But it deserves our gratitude 😉
Uhm... yeah... I did forget how picky you are with people who don't worship you.
As I said, I don't like GNU tools just like you, but cursing them won't hide the fact that basically all existing free software and all existing open source projects simply would NOT EXIST without them.
This is not a reason to worship GNU. But it's enough to not fire on the red cross.
Anyway... good night!
well... yeah... but how this is relevant when we are talking about development tools, history and C standards? 🤣
Well... this is not what Drew was saying.
Yes, that's something I could agree.... in the long run.
But honestly I'm really not sure that if all GNU projects would disappear right now, the world would keep going as if nothing happened.
No GTK? No Gimp? No Gnome?
I'm not saying the Free Software world wouldn't reboot, but it would be a hard reset.
Beware @sroracle, you are going to be blocked by @sir for this
kind of "nonsense". 😉
Yesterday I spent 30 minutes trying to help him understand that his hate for #GCC is misdirected (and undeserved) see https://qoto.org/web/statuses/102380322656831790 and now I'm blocked.
But you know, hating a "third-order" dependency like #GNU that made your whole #business possible but you have no real impact upon is a great #marketing tool.
#OSS people love to throw shit at GNU and #FSF as they are unlikely to fight back.
But often if you dwell deeper, they don't know what they are talking about.
That's the main difference between #FreeSoftware #hackers and #OpenSource developers.
@Shamar @sroracle @sir I'm not sure if I necessarily agree with that last bit.
I'm passionate about libre software and agree the GPL is useful. I also think a lot of GNU projects are unnecessarily bloated.
GCC is not one of them. GCC is probably the best compiler we'll ever have just because it's so portable to everything, and so compatible.
But we @AdelieLinux do have https://da.gd/De-GNU as an eventual goal; even so, GCC isn't on the list.
@awilfox @sroracle @sir @AdelieLinux
I think that #GNU #GCC has (and had) it's issues (just like any other software, or well... human artefact), but it's for sure a valuable piece of software.
It's true that the large number of optimizations available, the large number of operating systems and architectures supported, the various language frontends make it a very complex piece of software.
Also it's a venerable program collection, with more than 30 years of active development and research on its shoulders, with all it implies.
Finally, I think everybody remember the (dumb and short-sighted) #Stallman opposition to exposing its AST in 2015 (see https://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00171.html )
Yet I agree that GCC is still probably the best compilers COLLECTION we have (I'd argue that Ken Thompson compiler suite for Plan 9 was simpler and more portable, but it's not a compilers' suite and it's not even a standard C compiler).
@awilfox @sroracle @sir @AdelieLinux
All this said I wonder what we disagree upon... 😆
About the difference between #FreeSoftware and #OpenSource?
I think I should write something about this as with time my understanding of the issue deepened.
But here you can find the incident that opened my eyes on the matter: https://medium.com/@giacomo_59737/what-i-wish-i-knew-before-contributing-to-open-source-dd63acd20696
@Shamar @petit sr.ht runs on Alpine, so basically none.