www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/16/16:34:59

Date: Mon, 16 Sep 1996 13:16:59 -0700 (PDT)
From: Samuel Vincent <svincent AT cs DOT sonoma DOT edu>
To: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
cc: kagel AT dg1 DOT bloomberg DOT com, thoni AT softlab DOT se, djgpp AT delorie DOT com
Subject: Re: Possible static data zeroisation bug in DJGPP v2?
In-Reply-To: <1.5.4.16.19960916122832.29a7d2c4@dmeasc.rc.ipt.br>
Message-ID: <Pine.GSO.3.94.960916131347.18588A-100000@zippy>
MIME-Version: 1.0

On Mon, 16 Sep 1996, Cesar Scarpini Rabak wrote:

> Excerpt from K&R Book 2nd ed. pg 40: 
> "...External and static variables are initialized to zero by default."
> 
> I have no ANSI/ISO standard handy by now, but it is on the standard as well
> (I think on section four).

You must forgive me for my disbelief, but how can an "external" variable
be initialized at all?  It's initialized elsewhere,  where it is
defined, not declared (externally declared or not...)

As far as static variables go, I don't have that info available, but
it would make sense to zero it yourself anyway.  I believe ANSI says
absolutely nothing is initialized unless you do it yourself.

-Sam


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019