www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/07/10/11:03:23

Date: Mon, 10 Jul 1995 17:48:44 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
Cc: DJGPP AT SUN DOT SOE DOT CLARKSON DOT EDU
Subject: Re: Odd behavior with static arrays

On Mon, 10 Jul 1995, A.Appleyard wrote:

>   Again, why in Gnu C++ A.OUT's does every static variable and array have to
> be written out at length as reams of ascii-zeros??? It wastes disk space. In
> my university's bygone mainframes' equivalents of .EXE files, there were
> special brief formats to say "repeat the next n bytes p times" and "set the
> next n bytes to all zero". I hope this will be put right in version 2.

This is GNU C++ compiler's (mis)feature, DJGPP can't do anything with it 
unless FSF change the compiler.  It only plagues C++ programmers, in C 
you get what you want.  If you want to get C behavior in C++ programs, 
you should use the -fconserve-space compiler switch to GCC.  If you want 
this by default, put it into your lib/specs file, in the cc1plus: section. 

- Raw text -


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