chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] Pessimizing undefined behavior


From: felix . winkelmann
Subject: Re: [Chicken-hackers] Pessimizing undefined behavior
Date: Thu, 04 Apr 2019 22:47:13 +0200

> > Once you give a fixed meaning, even by doing an optimization based
> > on this meaning, users _will_ start to rely on it. At that stage it isn't
> > undefined anymore.
>
> There's two ways I can think of getting warnings, then.
>
> a) Easy version. Randomly choose true or false at each if. Use some
> method that keeps the builds deterministic. This wouldn't assign any
> more fixed meaning for undefined than there currently is.
>
> b) Add special code to handle undefined in ifs. Adds one more of those
> type tree walkers. May not be entirely trivial. Any takers?

I think this is getting out of hand... I'm not suggesting to do anything
like this, of course. Just leave things as they are, take more care when 
warnings
scroll by, keep your own fork or consider a "treat-warnings-as-errors"
switch. I don't see a serious problem with the way things are currently
implemented.

My point is that "undefined" should have no ad-hoc _definition_ of "truthiness",
whether this means documentation or some fixed compile-time semantics.


felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]