home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!asuvax!ncar!noao!amethyst!organpipe.uug.arizona.edu!news
- From: dave@cs.arizona.edu (Dave Schaumann)
- Newsgroups: comp.lang.c
- Subject: Re: Parameter passing & data abstraction
- Message-ID: <1993Jan1.002606.13612@organpipe.uug.arizona.edu>
- Date: 1 Jan 93 00:26:06 GMT
- References: <1992Dec30.184135.1963@organpipe.uug.arizona.edu> <24524@alice.att.com>
- Sender: news@organpipe.uug.arizona.edu
- Reply-To: dave@cs.arizona.edu (Dave Schaumann)
- Organization: University of Arizona
- Lines: 61
- In-Reply-To: bs@alice.att.com (Bjarne Stroustrup)
-
- In article <24524@alice.att.com>, bs@alice (Bjarne Stroustrup) writes:
- >
- >
- >dave@cs.arizona.edu (Dave Schaumann @ University of Arizona) writes
- >
- > [I complained about the large size executables g++ produces]
- >
- >That cannot be a C++ problem. For
- >
- > #include <stdio.h>
- >
- > main() { printf("Hello, World\n"); }
- >
- >I get
- >
- > text data bss dec hex
- > 12288 6144 7624 26056 65c8
- >when compiling as a C++ program, and
- >
- > text data bss dec hex
- > 12288 6144 7612 26044 65bc
-
- OK, fair enough. Here's what I get:
-
- Machine gcc size g++ size (size in bytes)
- ------- -------- --------
- Sequent 18085 23882
- Sun 4 24576 110490(!)
-
- >when compiling as a C program. Changing the example to use
- >specific C++ facilities
- >
- > #include <iostream.h>
- >
- > main() { cout << "Hello, World\n"; }
- >
- >I get
- >
- > text data bss dec hex
- > 17408 2048 0 19456 4c00
-
- I get 175759 on the Sequent, and 285202 on the Sun.
-
- >Ofcourse G++ may be different, but that difference ought to
- >show up in GNU C also, then
-
- I spoke to the person responsible for maintaining gcc and g++ at our site,
- and he said
-
- # g++ 1.40 needs to use the GNU loader, to resolve the munged function names
- # and do creator/destructor calls. GNU ld doesn't grok dynamic libraries, so
- # you end up binding a large portion of libc (and, in your case, libg++) into
- # the binary.
-
- Yes, we are still using 1.40 :-( But he also said a new version is scheduled
- to be installed "almost immediately". The only other option is some cfront-
- like program called CC, but (at least the version we have) is so hoplessly
- brain-damaged as to be unusable.
-
- --
- Hey, everybody -- somebody said `mattress' to Mr. Lambert! TWICE!
-