If you could make any changes to D, what would they look like?

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Oct 27 19:55:00 UTC 2021

On Wed, Oct 27, 2021 at 07:40:10PM +0000, Dukc via Digitalmars-d wrote:
> On Wednesday, 27 October 2021 at 19:31:52 UTC, H. S. Teoh wrote:
> > 
> > Returning a void-initialized (i.e., *un*initialized) result invokes
> > UB.  The compiler is free to do (or not do) whatever it wants in
> > this case.
> Only if the result contains pointers. With other types, the result is
> undefined but not the rest of the program.

Right, but the result being undefined means the compiler is free to
cache or not cache the return value without violating the spec.


"Holy war is an oxymoron." -- Lazarus Long

More information about the Digitalmars-d mailing list