Mail Archives: djgpp/1996/09/19/12:04:53
DJ Delorie wrote:
>
> * If you have any static, but uninitialized variables, like these:
>
> int q;
> char foo[500];
>
> then the DJGPP startup will guarantee that they start off with
> binary zeros in them. This is required by ANSI, and thus it is so.
>
Right.
However the issue has been resolved (it was an indexing problem caused
by char being signed in DJGPP by default). The hassle to find the
thrashing was caused by having a public variable named the same as the
module in which the static data was declared. Thus it was not possible
to display it using gdb even using the filename, and I was not
previously aware that gcc placed symbol information about module-static
data only in scopes where it was referenced (it did work to just add a
dummy reference in any function, the structure was then suddenly
"available in the current scope").
Well, as well...
Thomas
--
"Little languages go a long way..."
(ThoNi of ThoNi&GorFo Adventure Factories in 1985)
--------------------------------------------------------------------------------
Thomas Nilsson Phone Int.: (+46) 13 12 11 67
Stenbrötsgatan 57 Phone Nat.: 013 - 12 11 67
S-582 47 LINKÖPING Email: thoni AT softlab DOT se
SWEDEN alan-request AT softlab DOT se for info
--------------------------------------------------------------------------------
- Raw text -