Oddbean new post about | logout
 nostr:npub1wc2kznjw6kldwzz8eedr9pf208waa8ww3fjsqk0nz4rdv8q663qswt4sk7 nostr:npub17jqvr0kp48sjwctcvhre8lk87yr5qqe726zkunwq2uhtd35wdx4sgkv996 

> I care about the compilers we have today, in the year or our Lord 2023.

This is why I listed the two acceptable current-year compilers.  A few others were mentioned in the thread, chibcc looks fun.

But you are making my point:  you said that, unless it follows the current-year ISO standard, it's not C but some other language, and I said that it matters what the compiler does, and I don't wish to use a compiler that does something stupid and uses some ISO standard or another as an excuse for doing something retarded when translating my C code into machine code.

It's like an appeal to authority.  People make the standard:  they necessarily sit down and evaluate trade-offs and then decide which behavior is desirable and which is undesirable.  The standard doesn't come to them from God:  it is people sitting around deciding.  I didn't vote for any of the people in the standardization body, did you?  I didn't even know who David Keaton was until a day or two ago.  I have decided that some of the behavior the standards body have described as desirable is actually undesirable.

> both gcc and clang implement C99 thoroughly except

Then they are not C99 compilers, but some other language.  C is C23, otherwise you're talking about some other language, it's not C.

...Or standards are enumerations of behaviors that you can generally rely on most compilers evincing.  Same with the RFCs:  you can say that Pleroma does not comply with semantics outlined in the HTTP RFCs, but you can't say that Pleroma does not act as an HTTP server and provide a web service, or at least you are unlikely to be able to say it with a straight face.  Pleroma does what it does, the browsers understand what it's doing, working code is born, I can log into FSE and type all my idiot thoughts.

> Dunno about the later standards and don't really care that much about them. 

They are terrible and should be ignored.  Unfortunately, clang takes the rules-Nazi approach and gives you monkey-paw (or mischievous genie, adjust mythology to your liking; maybe the Robot Devil) code, and gcc continues to do something dumb but patronizing, so these compilers are terrible.  I do not like the way the standards body has behaved or how these two compilers behave.

Before, as long as you avoided doing things that actually were non-portable, your C worked fine.  Now they've decided that, on the grounds that something could be theoretically non-portable it should be silently rewritten on the assumption that it can't happen, they have botched the compiler.