3 ms·
Well, it so happens that C23 has so far been decided to remove K&R function declarations! (the "int fn() int arg1, arg2; { /*code*/ }" kind) So it's not utterly
by dzaima 5y ago
Well, it so happens that C23 has so far been decided to remove K&R function declarations! (the "int fn() int arg1, arg2; { /*code*/ }" kind) So it's not utterly impossible for old things to get removed (though who knows if that'll change).
But C syntax really isn't the biggest problem in this. Even if you decide to write a whole new C parser for your new language, you'd still need to support the 176 ABI triples (or not work on many systems) and detect & choose which one the user's system uses. It wouldn't be hard to reduce that number by a lot if anyone actually would've tried to.
- tayistay 5y agoWhy wouldn’t it be hard to reduce that number? Architectures do differ after all.
- dzaima 5y agoArchitectures do differ, but there's really not a good reason to have dozens of ABIs per architecture. But that's what we have - 15 for aarch64, 9 for armv7, 27 for x86-64, etc. Most things in each set most likely do match, but there's no specification of how they do, so it's hard to consider them in a way other than just a dozen different ABIs that might as well be for different architectures.
- School-Cotton 5y ago> Well, it so happens that C23 has so far been decided to remove K&R function declarations! Interesting! I stand corrected, then.