Related articles |
---|
RE: Undefined Behavior Optimizations in C nuno.lopes@tecnico.ulisboa.pt (Nuno Lopes) (2023-01-05) |
Re: Undefined Behavior Optimizations in C 864-117-4973@kylheku.com (Kaz Kylheku) (2023-01-09) |
Re: Re: Undefined Behavior Optimizations in C jonathanchesterfield@gmail.com (Jon Chesterfield) (2023-01-10) |
Re: Undefined Behavior Optimizations in C tkoenig@netcologne.de (Thomas Koenig) (2023-01-11) |
Re: Undefined Behavior Optimizations in C david.brown@hesbynett.no (David Brown) (2023-01-11) |
Re: Undefined Behavior Optimizations in C 864-117-4973@kylheku.com (Kaz Kylheku) (2023-01-12) |
Re: Undefined Behavior Optimizations in C Keith.S.Thompson+u@gmail.com (Keith Thompson) (2023-01-12) |
Re: Undefined Behavior Optimizations in C tkoenig@netcologne.de (Thomas Koenig) (2023-01-12) |
Re: Undefined Behavior Optimizations in C 864-117-4973@kylheku.com (Kaz Kylheku) (2023-01-15) |
[14 later articles] |
From: | Jon Chesterfield <jonathanchesterfield@gmail.com> |
Newsgroups: | comp.compilers |
Date: | Tue, 10 Jan 2023 10:46:32 +0000 |
Organization: | Compilers Central |
References: | 23-01-027 <sympa.1673343321.1624.383@lists.iecc.com> |
Injection-Info: | gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="78830"; mail-complaints-to="abuse@iecc.com" |
Keywords: | C, optimize |
Posted-Date: | 10 Jan 2023 16:59:04 EST |
In-Reply-To: | <sympa.1673343321.1624.383@lists.iecc.com> |
> So before we decide if UB optimizations are actually allowed by the
standard we need to decide what "ignoring the situation completely
with unpredictable results" actually means.
[1] https://port70.net/~nsz/c/c89/rationale/
Lucian
WG14 are aware of UB optimising compilers and could have steered away from
this path, but haven't. It's been decades now. The pointer provenance work
seeks to apply aliasing rules even more aggressively. GCC and clang are
both pursuing faster codegen via exploiting undefined behaviour.
C, the WG14 ISO defined language, as implemented by the primary open source
toolchains, is thus unfit for my purposes. I'm not clear what use that
language has.
C, the typed assembler of ye olde times, is a profoundly useful language.
One just can't use GCC or clang to build it reliably.
It annoys me intensely that the type aliasing rules capture something a
whole program optimising compiler can usually work out for itself anyway,
while preventing me from reading 128bit integers from the same memory I
fetch_add 32bit integers into.
Jon
Return to the
comp.compilers page.
Search the
comp.compilers archives again.