3 ms·
"No two C programmers can possibly disagree about what that code should do if it were to be defined." The whole point is that there is no agreement on how they
by gpderetta 10y ago
"No two C programmers can possibly disagree about what that code should do if it were to be defined."
The whole point is that there is no agreement on how they should be defined.
"At least we seem to agree as far as that optimizing based on the assumption that aliasing does not take place is one of the worst things that could happen"
I do want the compiler to optimize assuming no aliasing but first I want: a) the rules to be clarified beyond the current mess; b) have a strict compilation mode (possibly on by default) that will enforce the rules so that mistakes can be caught. Such mode would necessarily be very slow as the C language is very unfriendly to such an analysis (in the worst case you need a shadow type map for every memory location), but given the nature of aliasing violations, even a debug only mode should catch the large majority of mistakes.