Mail Archives: djgpp/1999/08/08/11:51:28
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 -