@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 GNU is perhaps the single largest threat to software quality in our entire ecosystem
@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.
@Shamar @petit what did I miss?