[M3devel] [M3commit] CVS Update: cm3

Tony Hosking hosking at cs.purdue.edu
Tue Jul 6 21:18:26 CEST 2010


I was proposing a 0 value in the common case (where 0 bits are valid for the type).

On 6 Jul 2010, at 13:23, hendrik at topoi.pooq.com wrote:

> On Tue, Jul 06, 2010 at 01:10:34PM -0400, Tony Hosking wrote:
>> Or, alternatively, we could turn it around and have a flag that turns off (for performance if desired) well-defined initialisations (much like nochecks does to turn off other runtime checks).  This would be in the spirit of the language spec, which says simply that some legal value is present, and simply go one step further in making the initialised value deterministic.  As far as I can tell, this changes only the behaviour of "automatic" variables (function-scope local variables) whose initial value can be any combination of bits in the variable.  All other variables get deterministic initial values already.
> 
> A flag like that that uses a consistent junk value would also be 
> useful, since it's less likely to be accidentally masked.  Zero is far 
> too commonly valid for the application, and not just valid for the 
> language.
> 
> -- hendrik




More information about the M3devel mailing list