[cfe-dev] Feature/opinion request

David Chisnall David.Chisnall at cl.cam.ac.uk
Thu Oct 11 11:05:17 PDT 2012


On 11 Oct 2012, at 18:58, Matthieu Monrocq wrote:

> I find it much easier to run with `-Wmaybe-uninitialized` on. And in the cases it's missed, I'd prefer for debug builds to stop zero-initializing everything and let the software crash... that's what debug builds are for!

I'd possibly actually prefer debug builds to initialise with some value like 0x7777777777777777, which is very unlikely to be a valid pointer even with some arithmetic and is also likely to give obviously-wrong errors when used as arithmetic.  The problem with 0 is that 0 quite often is a valid, but wrong, value.

David



More information about the cfe-dev mailing list