www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/08/11:51:28

Date: Sun, 8 Aug 1999 14:00:27 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Endlisnis <s257m AT unb DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: A bug
In-Reply-To: <37ACCB8F.30CF0863@unb.ca>
Message-ID: <Pine.SUN.3.91.990808140007.23423K-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 7 Aug 1999, Endlisnis wrote:

>     Well, I can't seem to recreate it, so it was probably my
> imagination, but I did notice that static array values are loaded
> from the executable, which makes this program over 40Megs as an
> executable:
> 
> ------------------
> #include <stdio.h>
> int a[10000000];
> 
> int main(int argc, char *argv[])
> {
>  printf("size = %d", sizeof(a));
>  return 0;
> }

You probably compiled this as a C++ program, because C programs don't
have this misfeature.  See section 8.12 of the FAQ for a work-around.

- Raw text -


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