Sujet : Re: Computer architects leaving Intel...
De : niklas.holsti (at) *nospam* tidorum.invalid (Niklas Holsti)
Groupes : comp.archDate : 05. Sep 2024, 19:38:07
Autres entêtes
Organisation : Tidorum Ltd
Message-ID : <ljuc4fF86o3U2@mid.individual.net>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : Mozilla Thunderbird
On 2024-09-05 18:49, Anton Ertl wrote:
David Brown <david.brown@hesbynett.no> writes:
On 05/09/2024 13:31, Anton Ertl wrote:
[ discussion of the implementation of Gforth as a code-copying
and code-pasting interpreter, and the maintenance problems
this leads to when changing gcc versions ]
It seems to me that this discussion (of Gforth) has very little do to with the ability of C compilers to optimize away or do something else with C code that the compiler detects invokes Undefined Behavior, and instead concerns how successive gcc versions break the assumptions that Gforth developers make about the structure of the machine code that gcc emits for legal C code that does not invoke Undefined Behavior if executed without modification.
If you try to restructure or modify the machine code that Gcc produces on the fly, during program execution, as Gforth tries to do, that is so outside the C standard that it is only Undefined Behavior in the sense of not being even considered in the standard.
I don't doubt that Anton has experienced bad effects of the "optimization" of Undefined Behavior, in other contexts, but I tend to agree with David on that issue.