News for hackers. Stuff that matters.
Re:C meeting is over. C23 added: by 10x-dev on Saturday February 19, 2022 @06:12AM (#30396213)
Control over the code that actually runs.

We already lose quite a bit of control with C (e.g. it reorders your code as it pleases) to gain portability across CPUs, otherwise we'd have to rewrite the code in several assembly languages.

If you consciously choose to give up even more control over the code that runs (because a compiler that targets C necessarily adds another layer of autogenerated code that you don't control) then it better be a wise tradeoff.

Re:C meeting is over. C23 added: by WithinReason on Saturday February 19, 2022 @06:43AM (#30396369)
The downside of reordering being performance? Or something else?
Re:C meeting is over. C23 added: by 10x-dev on Saturday February 19, 2022 @07:05AM (#30396491)
Performance is usually the upside. The downside is subtle bugs that can happen due to side effects of the statements being reordered between sequence points.
Re:C meeting is over. C23 added: by WithinReason on Saturday February 19, 2022 @07:14AM (#30396554)
AFAIK compilers don't reorder if it would change the result.
Re:C meeting is over. C23 added: by Thiez on Saturday February 19, 2022 @10:05AM (#30397631)
Compilers not allowed to violate the language spec when optimizing. But the spec may be fairly generous in its allowed interpretations, which may not match what a programmer may naively expect. C, with its many undefined behaviors and implementation defined behaviors, is especially dangerous.