delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/10/10:54:28

Date: Sun, 10 Aug 1997 17:54:04 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Erik Max Francis <max AT alcyone DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Linux to DOS Problem
In-Reply-To: <33E7534E.2EC8CF11@alcyone.com>
Message-ID: <Pine.SUN.3.91.970810175343.4651X-100000@is>
MIME-Version: 1.0

On Tue, 5 Aug 1997, Erik Max Francis wrote:

> Paul Derbyshire wrote:
> 
> > Sounds like maybe the value depends on uninitialized memory. Different
> > platforms treat it differently; one compiler or GCC on one platform may
> > initialize all memory used at zero; another or GCC on another might
> > leave
> > it random.
> 
> I find that to believe.  The undefinedness of uninitialized auto variables
> is built into the language, and gcc is well aware of it.  gcc for Linux
> and DJGPP are just ports of the same thing, after all.

That's true, but the memory for the uninitialized variables comes from
the runtime memory allocation functions.  If those zero the memory,
you have zero initial values.  I recall vaguely that this was one of
the main problems when porting v1.x library to v2.0: some of the
functions assumed memory was zeroed.

- Raw text -


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