4 ms·
That's why it needs fixing. We are not in the early days anymore.
by sylware 4y ago
That's why it needs fixing. We are not in the early days anymore.
- klodolph 4y agoProblem is simple—there are still systems out there like that, and people are still buying them and writing C code for them. They're just in the embedded space, where day-to-day programmers don't encounter them.
- sylware 4y agoThen those systems are maintained, then then could correct their legacy C code to "fixed-C" (which should be not that much in-real-life anyways). It would be possible to do a quick-and-dirty work with preprocessor definitions. The real thing is when you want to write "fixed-C" with a legacy compiler: you realize than it does so much things without telling you, you would need a really accurate warning system in order to catch all those things. I was told gcc can report all integer promotions, true?
- astrange 4y agoYou shouldn't fix it by making users choose what bit width their ints are. That's not the right answer for performance (they don't know what's fastest) or correctness (the only choices are incorrect). If you have a variable whose values are 0-10, then its type is an integer that goes from 0-10, not from 0-255 or -127-127.