| www.delorie.com/djgpp/mail-archives/browse.cgi | search |
| Xref: | news-dnh.mv.net comp.os.msdos.djgpp:2648 |
| Path: | news-dnh.mv.net!mv!news.sprintlink.net!news.zeitgeist.net!bdt.com!miwok!internetMCI!newsfeed.internetmci.com!info.ucla.edu!library.ucla.edu!news.ucdavis.edu!wheel!elric |
| From: | elric AT wheel DOT dcn DOT davis DOT ca DOT us (Jeffrey Taylor) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Stupped : V2.0 bug? |
| Date: | 14 Oct 1995 00:12:23 GMT |
| Organization: | Davis Community Network - Davis, California, USA |
| Lines: | 21 |
| References: | <DFzxG1 DOT Bwr AT jade DOT mv DOT net> <3074a309 DOT sandmann AT clio DOT rice DOT edu> <459lk2$cr2 AT thebes DOT waikato DOT ac DOT nz> <mictaliDGEAu5 DOT JCx AT netcom DOT com> |
| Nntp-Posting-Host: | wheel.dcn.davis.ca.us |
| To: | djgpp AT sun DOT soe DOT clarkson DOT edu |
| Dj-Gateway: | from newsgroup comp.os.msdos.djgpp |
The definition of C says that global data that is not explicitly
initiallized is initiallized to zero. Not all compiler/linkers/loaders do
it right, but they are broke, not the program. Local (auto) data is
another matter. Heap space is also not required to be initialized.
Jere McDevitt (mictali AT netcom DOT com) wrote:
: Just a thought, but I remember back in my old programming days (pre C++)
: that all of the "good" programmers said NEVER count on a variable having
: a value before you initialized it. I know that Borland zero's out the
: global data, so maybe we've gotten a little lazy expecting a variable to
: be 0'd without doing it ourselves.
: My thoughts are my own.
: Jere McDevitt
--
============================================
Without my guitar, I am a poet without arms.
- Michael Bloomfield
============================================
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |