Re: New draft version of o65 file format

From: Spiro Trikaliotis (ml-cbmhackers_at_trikaliotis.net)
Date: 2005-04-01 12:23:40

Hello,

* On Fri, Apr 01, 2005 at 11:52:43AM +0200 Gabor Lenart wrote:
> On Fri, Apr 01, 2005 at 10:44:21AM +0200, Ullrich von Bassewitz wrote:
> > This is just an idea, and I'm not sure if it is useful, so let me
> > explain: The C standard guarantees that anything not intialized
> > explicitly in the source has the '0' value of the data type. This
> > must not necessarily correspond to a
> 
> ? Really? I've never seen this rule! In fact when I was learnt to code
> C it was told that uninitialized variables has TOTALLY UNDEFINED
> value, you can't assume anything.

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.

Regards,
   Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.