Re: egcs produces bloated code by default
Jason Gunthorpe <jgg@gpu.srv.ualberta.ca> writes:
No, exception handling is a C++ only feature it will have no effect on C
programs whatsoever [huge egcs bug otherwise]. We have already taken the
size penatly for exception handling when we switched to eg++.
I was also about to say that this exception code bloat applies only to
C++ but the results of some tests were surprising:
blp:/raid/home/blp$ cd tmp
blp:/raid/home/blp/tmp$ cat > foo.c
int main (void) {}
blp:/raid/home/blp/tmp$ gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/2.8.1/specs
gcc version 2.8.1
blp:/raid/home/blp/tmp$ gcc foo.c
blp:/raid/home/blp/tmp$ ls -l a.out
-rwxrwxr-x 1 blp blp 9066 Oct 26 00:07 a.out
blp:/raid/home/blp/tmp$ egcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/egcs-2.91.57/specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
blp:/raid/home/blp/tmp$ egcc foo.c
blp:/raid/home/blp/tmp$ ls -l a.out
-rwxrwxr-x 1 blp blp 36387 Oct 26 00:07 a.out
blp:/raid/home/blp/tmp$
i.e., the size of a trivial program increase 4-fold from 9K to 36K! I
find this astonishing.
--
SIGSIGV: Sigmentation fault (core dumped)
Reply to: