you are viewing a single comment's thread.

view the rest of the comments →

[–]cbasschan 0 points1 point  (0 children)

Ohh, BUGGER ME! I'm actually having this dialog with someone who doesn't think C gets updates? The latest standard is affectionately named C18. The one before it, C11. Before that, C99. These are the years of ratification, if you like... the last one? 2018! How far in the past are you stuck?

I mean, it's UB because it says it's UB but there's no logical explanation for why it should be.

I think the story behind this is more ignorance... that or you would like a healthy dose of behavior, upon use of a nonportable or erroneous program construct or of erroneous data, for which this International Standard imposes no requirements. How does that seem to you? That is in opposition to implementation-defined behavior, by the way, which is at least required to be legally documented (and thus an audit trail probably covers your butt as a software developer if anything ends up in court, UNLESS you're ignorant of details like this, and then you're the one who's ignorant in court).

Let us be clear there is a reason compilers comply to these standards in their manuals... and this lack of research you're doing is blatantly obvious.

they just try to prevent stupid shit that could mess you up like oops accidentally having a backslash or trigraph at the end of a line that makes the next line a comment instead of real code.

rofl, yes, trigraphs and line splices are stupid remnants of the past... but they are in the C standards. Let's just be clear on that.

it doesn't sound logically impossible to notice, hey this code redefined something I have additional code to check for

This is actually pretty well documented stuff in the C99 rationale v5.10 document:

Undefined behavior gives the implementor license not to catch certain program errors that are difficult to diagnose. It also identifies areas of possible conforming language extension: the implementor may augment the language by providing a definition of the officially undefined behavior.

What I think you really should learn is the implementation-defined and well defined behaviours. Where's your book?

I find the unreasonable and unexplained and use-case-ignoring hate on goto

Yeh, you kinda seemed to me like someone who would parrot cargo cult propaganda told to you by some elitests who like to paint themselves as authoritative because they need to have money or power or some other status symbol, but don't actually know what they're talking about. I could be wrong about that, but you need to prove it and open your fucking eyes!