From: Gabor Lenart (lgb_at_lgb.hu)
Date: 2005-04-01 13:36:01
On Fri, Apr 01, 2005 at 12:23:40PM +0200, Spiro Trikaliotis wrote: > For K&R C (thus, before ANSI C), this rule was correct. In fact, this is > what I learned myself. > > Anyway, starting with ANSI C (C89), uninitialized variables have to be > initialized to "logical" 0 as long as they are not auto variables (that > is, non-static variables declared inside of a function). These later are > really uninitialized. Hmmm, anyway I would NEVER use an uninitialized variable whatever even not-exactly-compatible standards say between multiple architectures/compilers :) Also some compilers dump warning message if you try this. And I bet it's a good advice to avoid this madness also ... - Gábor Message was sent through the cbm-hackers mailing list
Archive generated by hypermail pre-2.1.8.