@sir How is it GCC's fault people don't stick to standards?

I used the default GNU extensions unwittingly and paid the portability price, code wouldn't compile on clang. (Side note. If you alias gcc to clang, I hate you.) My solution was to just use a cross platform implementation of the Gnuism, because it was a useful addition.

The reason C programmers use Gnuisms is because they're helpful. If you want strict C89 compliance, set up the compiler flags and test under multiple compilers. Then you can run reliably run on PowerPC or whatever.

Alternatively, learn autotools and learn to write truley portable software. There are more quirks to deal with then Gnuisms. GCC just happens to be very popular.

Or just stop using C.

@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

@sir

Out of curiosity, how many software and libraries running on sr.ht have been developed on systems and well... basically exist thanks to GNU tools?

@petit

Follow

@sir

read the question more carefully 😉

@petit

@sir @Shamar @petit

i think the implication is that the tools you used to make sr.ht were developed on a GNU system or using GNU tools.

@xj9 @Shamar @petit what, so I should be thankful because I have third-order exposure to GNU trash? I bet some people have sent me patches they wrote on Windows, too, that's only 1 order removed so clearly Windows is a force for good and I ought to be thankful to Microsoft

@sir @petit @Shamar

:thinking_cirno:​ oh idk i've just heard this kind of thing a lot. i'd like to have exactly zero lines of GNU code in my life to be perfectly honest. that's one of the things that attracted me to Apline in the first place.
@xj9 @sir @Shamar Alright, you all work this out for me. One of the extensions to GCC is integer overflow semantics for signed types. Is this okay or should GCC provide no standard signed overflow behavior?

@petit @Shamar @xj9 C compilers should abort on undefined behavior, rather than take it as license to do whatever they want. Signed integer overflow is no exception to this

@petit @Shamar @xj9 but let's be serious: very few of GCC's extensions are that conservative. Most of them are radical and reckless changes to the language and are so poorly specified that you have no hope of implementing them in another compiler without reverse engineering GCC.

@sir @xj9 @Shamar That's fair enough.

Once again, why is it GCC's fault people use extensions. Is there a C compiler without extensions or are GCC extensions unique somehow?

@petit @Shamar @xj9 people use the tools you give them. If you give GCC -std=c11 -pedantic, which is supposedly going to disable all extensions, it only disables maybe 25% of them

@petit @Shamar @xj9 most people don't realize the weight of their choice to use extensions, or that the features they're using are even extensions at all. The fault for this lies squarely with GCC. Extesnsions should be opt-in or not there at all.

@sir @xj9 @Shamar I agree. I wish the default was C89. Fortunately, this can be done by distros or even admins. That said, anyone with a program that isn't trivially portable probably knows they're using GNU extensions.

@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.

@sir @xj9 @Shamar I don't know if I believe you about there being no strict mode that's as compliant as any other compiler. How is libc an issue? If the library is already compiled, then it doesen't make a lot of sense to complain about the compiler.

long, on undefined behaviours, human sin, computing history and why people should read the C standard before blaming GCC 

@sir

Are you sure?

Because the 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 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. ;-)

@petit @xj9

@sir

Yes, if that IS the case, you should be thankful to , 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 😉

@xj9 @petit

@Shamar @xj9 @petit I mean, let's invoke Godwin's law, then. My mom gave birth to me, and she used to own a Volkswagon Beedle, so therefore...

@Shamar @xj9 @petit if the absurdity of your argument is not yet apparent to you then I have no interest in continuing this discussion with you

@sir

well actually, if your mother conceived you inside the Volkwagon Beedle, yes: you wouldn't be here without it.

The fun fact of life is that, like it or not, we are ALL tightly coupled.

@xj9 @petit

@Shamar @xj9 @petit oh, shut up already. I'm not interested in talking with you about this anymore.

@sir

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!

@xj9 @petit

@xj9

well... yeah... but how this is relevant when we are talking about development tools, history and C standards? 🤣

@Shamar

its like this: sure, without your dad you woudn't exist, but what if your dad is a piece of shit?

sure, the open source and free software movements may be an outgrowth of the GNU project, but if their code is shit that means somebody has to waste a bunch of time rewriting all of that garbage. thanks for the social movement, but please GNU delete all of your code.

@xj9

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.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.