On Tue, Apr 22, 2014 at 02:57:17PM -0700, Matthew Dempsky wrote:
> On Tue, Apr 22, 2014 at 2:43 PM, Stefan Sperling <s...@openbsd.org> wrote:
> > Your regression test has at least one bug ('bad' is never initialised).
> 
> It's perhaps bad *style* to not explicitly initialize it, but C99
> 6.7.8p10 says "If an object that has static storage duration is not
> initialized explicitly, then: [...] if it has arithmetic type, it is
> initialized to (positive or unsigned) zero".  So technically not a
> bug. :)

Ah. I thought the 'static' keyword was needed for this to apply,
didn't know it affects globals automatically. Thanks for the correction.

Reply via email to