HDTenEightyP/NetNews huggingface dataset:
From: lukka@klaava.Helsinki.FI (Tuomas J Lukka)
Subject: Re: sccs eats good code -
Organization: University of Helsinki
Distribution: comp
Date: Tue, 22 Dec 1992 13:47:40 GMT

>A simple solution is to replace the original string with something
>like "%w%\H%\M%\S".  Ugly, but it works.  Unfortunately, it is an
>"active" solution - if you don't notice the problem when you write
>the code, you may get unexpected replacements, whereas with a "good"
>system, you would only get the replacements when you want them.

Actually, this raises the danger of another problem: 
What if your vendor has some nifty character escape sequence defined
as \H? Or maybe \H=\h on your compiler? The ANSI states that other
escape sequences cause undefined behaviour. A better solution is:
"%w%""H""%""M""%""S"
And this works correctly on any ANSI compiler.

	TJL
From: dave@cs.arizona.edu (Dave Schaumann)
Newsgroups: comp.lang.c
Subject: Re: String function names
Date: 1 Jan 93 03:23:04 GMT
Reply-To: dave@cs.arizona.edu (Dave Schaumann)
Organization: University of Arizona

In article <28185@dog.ee.lbl.gov>, torek@horse (Chris Torek) writes:
>>>what on earth are "strcspn()", "strpbrk()", and "strspn()"
>>>supposed to mean?

>Someone else posted some guesses, but I think mine are closer. :-)
>
>	strspn:	span (extend across) characters in a set, hence
>		`STRing SPaN'
>	strcspn: span characters in the complement of a set, hence
>		`STRing Complement SPaN'
>
>Strcoll() comes from `collate' (`assemble and arrange systematically'
>or `compare').  Strpbrk() is something of a puzzle; the best I can come
>up with is `point to break character' (from a set of break characters):
>e.g., one might find white space for token-making using
>
>	p = strpbrk(str, " \t\n");

It is likely this comes from SNOBOL, which includes two functions
called SPAN and BREAK.  The Green Book(%) says:

# SPAN and BREAK are primitive functions whose values are pattern
# structures that match runs of characters [...] SPAN matches the
# longest string [...] consisting soley of characters appearing in
# the argument [...] BREAK matches the longest string [...] that
# does not contain a character of the argument.

% The Green Book is _The SNOBOL4 Programming Lanugage_ (2nd edition)
  by Griswold, Poage, and Polonsky.  It has a green cover.

-- 
What signature?
Newsgroups: comp.lang.c
From: fischer@iesd.auc.dk (Lars Peter Fischer)
Subject: Re: What's wrong with the following code...?
Organization: Mathematics and Computer Science, Aalborg University
Date: Mon, 21 Dec 1992 21:39:32 GMT


 [ I tried to answer by mail, but it bounced, so... ]

>>>>> "Conrad" == Conrad Taylor (ctaylor@cs.uiuc.edu)

Conrad> void TreeBuild(NODEPTR Root)
Conrad> {
Conrad>     Root = NULL;

Conrad>     TreeInsert(6, Root);
Conrad>     TreeInsert(4, Root);
Conrad>     TreeInsert(8, Root);
Conrad>     TreeInsert(7, Root);
Conrad>     TreeInsert(9, Root);
Conrad>     TreeInsert(5, Root);
Conrad>     TreeInsert(3, Root);
Conrad> } /* end TreeBuild */


Note that in the above, Root is local to the function. The
modification to Root (Root = NULL) is all fine and dandy, but in a
calling function, using

  TreeBuild (r)

r is *not* modified. r is passed by *value* and hence have the same
value after the call as it had before the call.

The best solution is to "return" value where possible instead of using
side effetcs, i.e.:

 NODEPTR TreeBuild ()
 {
    NODEPTR Root = NULL;

    Root = TreeInsert (6, Root);
    ....
    Root = TreeInsert (3, Root);

    return Root;
 }

and then use

 r = TreeBuild ();

Likewise, TreeInsert would be modified to read something like


 NODEPTR TreeInsert(int Number, NODEPTR Root)
 {
    if (Root == NULL)
      {
	 Root = (NODEPTR)malloc(sizeof(struct node));
	 Root->Info  = Number;
	 Root->LeftTree = NULL;
	 Root->RightTree = NULL;
         return Root;
      }
    
    if (Number < Root->Info)
      return TreeInsert(Number, Root->LeftTree);

    if (Number > Root->Info)
      return TreeInsert(Number, Root->RightTree);

    return Root;
 } 


Since you are returning only one value, this fits well, and in my view
the recursive nature of the algorithm is much simpler to understand
this way.

/Lars
--
Lars Fischer, fischer@iesd.auc.dk | It takes an uncommon mind to think of
CS Dept., Aalborg Univ., DENMARK. | these things.  -- Calvin
Newsgroups: comp.lang.c
From: dsembr01@orion.spd.louisville.edu (Darren S. Embry)
Subject: QUESTION: TRICKS USING THE ? : OPERATOR
Date: Tue, 22 Dec 1992 20:27:26 GMT
Organization: University of Louisville


Okay, here are a couple of interesting and maybe useful tricks I discovered
that involve the trinary ? : operator:

1)	Using it as a rudimentary if-else statement:

		(2*3==6)
			? printf ("TRUE")
			: printf ("FALSE");
		
	as a substitute for
	
		if(2*3=6)
			printf("TRUE");
		else
			printf("FALSE");
		
2)	Nesting the ? : operator, as in the example below:

	a?(b?c:d):e		can be written as	a?b?c:d:e
	a?b:(c?d:e)		can be written as	a?b:c?d:e
	
I discovered that both of these work using gcc and cc.  Here's a test program
I produced and here's the output:

------------------------------------------------------ test.c ----------------
#include<stdio.h>

main()
        {

        (2*3==6)
                ? printf("\n---TRUE---\n")
                : printf("\n---FALSE---\n") ;

        printf("%d %d\n",1?1?1:2:3,1?(1?1:2):3);
        printf("%d %d\n",1?0?1:2:3,1?(0?1:2):3);
        printf("%d %d\n",0?1?1:2:3,0?(1?1:2):3);
        printf("%d %d\n",0?0?0:2:3,0?(0?1:2):3);

        printf("%d %d\n",1?1:1?2:3,1?1:(1?2:3));
        printf("%d %d\n",1?1:0?2:3,1?1:(0?2:3));
        printf("%d %d\n",0?1:1?2:3,0?1:(1?2:3));
        printf("%d %d\n",0?1:0?2:3,0?1:(0?2:3));

        printf("%d %d\n", 1?0:1?2:3,1?0:(1?2:3));

        }
----------------------------------------------------- end of test.c --------

----------------------------------------------------------- output ----------
---TRUE---
1 1
2 2
3 3
3 3
1 1
1 1
2 2
3 3
0 0
---------------------------------------------------- end of output ---------

Now, here are a couple of questions that you must answer:

1) Is this valid ANSI or K&R C?
2) Does it work this way on other compilers for other systems?
3) Is this recommended?

I would appreciate lots of answers, and any objections to using this.

Thanks in advance,
-- 
---->8------ Darren Embry --- dsembr01@starbase.spd.louisville.edu -----8<----
 o  o   This is the Internet.  This is a .signature.  This is the 1990's.  You
\____/  know what to do.  This sentence is the implied disclaimer.  You know
        where to direct flames.
Newsgroups: comp.lang.c,comp.sys.hp
From: rich@bostech.com (Richard Baughman)
Subject: Ansi C compilers/debuggers for HP 9000/800?
Organization: Boston Technology, Inc.
Date: Tue, 22 Dec 92 14:59:52 GMT

A friend is looking for Ansi C-compliant compilers for the HP 9000 Series 800
machines.

Please reply by email.
Thanks.

-- 
Rich Baughman / Boston Technology / Wakefield, MA
rich@bostech.com
From: dave@cs.arizona.edu (Dave Schaumann)
Newsgroups: comp.lang.c
Subject: Parameter passing & data abstraction
Date: 30 Dec 92 18:41:35 GMT
Reply-To: dave@cs.arizona.edu (Dave Schaumann)
Organization: University of Arizona

It has come to me that C's mechanisms for parameter passing are less than
wonderful.  For instance, in defining some data structure, my typical
stratagy is to create a .h file with the struct definition, appropriate
typedefs, and #defines for simple functions.

The root of the problem is that I want to pretend that macros are really
in-line functions.  However, "macro functions" display "call by reference"
behavior, while real functions have call by value behavior.

One solution is to always pass pointers -- in effect, change the default
parameter behavior (for structs, anyway) to be call-by-reference.

Another would be to switch to C++, but I'm not especially keen to do that,
in part because the resulting executable (at least for g++) tend to be
300+K in size, even for fairly simple programs.

Anyone have further thoughts on this?

-- 
Dave Schaumann			dave@cs.arizona.edu
From: omarab@atlantis.CS.ORST.EDU (Scorpion)
Newsgroups: comp.lang.c
Subject: Re: C graphics question
Date: 1 Jan 93 22:58:39 GMT
Organization: OSU CS Outreach Services, Corvallis, Oregon
NNTP-Posting-Host: atlantis.cs.orst.edu

robohen@ocf.berkeley.edu (Henry Robertson) writes:

>I just purchased Think C version 5.0 for my Mac Classic II w/ system 7.0
>yesterday.  I am learning the language on my own, with a Teach-yourself C
>book.  Well, neither the teach-C book nor the manuals that came with ThinkC
>describe how to do graphics.  Can someone enlighten me on this via e-mail?

Hehehehe..... ya.... Ill help ya....  Im an EX Mac user... and I will tell
you the easiest way to fix your problem....

GET AN IBM.... ehehe...  Naw.. Ive got it for my Mac (which I don't use
much any more).  Im not sure... I never did it... but I believe you should
really take a close look in your OOP manual... I think it may discuss it
in there.... it is prob the best place to double check in.. 

-----------------------------------------------------------------------------
 Brendan O'Mara					Owner, Stealth Technologies,
 Email: omarab@jacobs.ucs.orst.edu		specializing in:
 Alias: Scorpion					
 Phone: (503)745-7549				Programming
						Computer Lessons
 Sysop of the Stealth BBS:			Computer Setup Assistance
 (503)745-7549, 9pm-7am weekdays,			
 24 hours most weekends.			Call for details!
------------------------------------------------------------------------------
-- 
-----------------------------------------------------------------------------
 Brendan O'Mara					Owner, Stealth Technologies,
 Email: omarab@jacobs.ucs.orst.edu		specializing in:
 Alias: Scorpion					
Newsgroups: comp.lang.c
From: gcouger@olesun.okstate.edu (Gordon Couger)
Subject: Re: Microsoft/Turbo C libraries
Organization: Oklahoma State University, Stillwater
Date: Wed, 23 Dec 1992 05:14:36 GMT

In article <1992Dec22.201453.817@panix.com> dans@panix.com (Dan Simoes) writes:
>Please excuse if this is the wrong sort of group for this.
>I am posting a question for a friend here at work.
>Please followup or reply directly to the address in my .sig.
>Thanks in advance.
>
>---
>>Dan,
>>
>>Re posting C questions to the Usenet group, the heart of the matter is
>>the extent to which objects and libraries produced by compiles from
>>different manufacturers are compatible.  Specifically, can I link
>>MicroSoft C libraries with Turbo C libraries and objects to yield a
>>TurboC executable?
>>
>>Thanks,
>>
>>Phil
>>
>---
>Dan Simoes                                       Voice: 914.747.2900 x415
>Danix Consulting                                 email: dans@panix.com or
>Yorktown Heights, NY                                     dans@danix.uucp
>-- 
>Dan Simoes                                       Voice: 914.747.2900 x415
>Danix Consulting                                 email: dans@panix.com or
>Yorktown Heights, NY                                     dans@danix.uucp

Gordon Couger
AB5Dg   Agriculture Engineering Oklahoma State University
gcouger@olesun.agen.okstate.edu 405-744-6514 day 744-2794 evenings   
Newsgroups: comp.lang.c
From: tim@rcsl.demon.co.uk (Tim Frost)
Subject: Re: Conversion of Lattice C to Microsoft C ??? 
Distribution: world
Organization: Roundhill Computer Systems Limited
Reply-To: tim@rcsl.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Thu, 31 Dec 1992 13:41:02 +0000

In article <1992Dec30.203127.25625@jpradley.jpr.com> adykes@jpradley.jpr.com writes:

>I'm about to be asked to convert a large application from
>Lattice C to a viable C compiler, the default is Microsoft C
>but we might consider another brand if it aided the conversion.
>
>The application uses Lattice's own B-tree/ISAM package, I'm told.  Is 
>there a third-party B-tree package that is call-compatible with Lattice's
>package ?
>
>We intend to replace the DOS character mode interface C code with a
>MS-Windows GUI tool, possibly Visual Basic, while keeping as much of
>the business logic code as possible. The surviving C code will be
>compiled into DLLs.
>
>What are the issues with Lattice-to-Microsoft C conversion ?  If there
>are differences has anyone developed a tool to automate the conversion ?
>
>Any advise is appreciated.

You may want to contact Crystal Software on (906) 822 7994.  They 
sell libraries which implement almost all the Lattice-specific 
non-standard library functions, and most of the add-ons, for other 
compilers such as Microsoft, Borland and Watcom.

You should also contact Copia International on (708) 682 8898.  They
have an ISAM package called AccSys which was developed by the same
people that wrote the Lattice package, and is much better than it.
The call structure is similar, but not quite call-compatible.

Both Crystal and Copia are headed by former Lattice people.

Finally, Lattice themselves have always sold their file package for
Microsoft as well as Lattice C, and as far as I know this is still
available from them.  You'll find it has not been upgraded for 
several years and, unlike the Crystal and Copia packages, may not 
work well with Windows.

-- 
:: Tim Frost ::::::::::::::::::: Roundhill Computer Systems Limited ::
::::::::::::::::::::::::::::::::::::::: Marlborough SN8 1SU England ::
:: tim@rcsl.demon.co.uk ::::::::::::: +44 (0) 672 84 535 (fax: 525) ::
:: rcsl is not associated with any other (dial-up) demon.co.uk site ::
Newsgroups: comp.lang.c
From: katzung@i88.isc.com (Brian Katzung)
Subject: Re: Moving from Pascal to C, Help please!!!!!!
Organization: Interactive Systems Corporation, Naperville, IL
Date: Thu, 31 Dec 1992 21:18:01 GMT

In article <78858@hydra.gatech.EDU> gt6758b@prism.gatech.EDU (Michael Maverick Kopack) writes:
|There are a lot of things about C that I find very frustrating after comming
|from a decent course in Pascal. For one is the way that Arrays are handled.
|I like being able to do stuff like    array [6..26] of int whereas in C you
|get forced into calling the indeces 0-19 [sic].

Try:

#define	ARRAYLOWER	6
#define	ARRAYUPPER	26
int	_array[ARRAYUPPER - ARRAYLOWER + 1];
#define	array	(&_array[-ARRAYLOWER])

|I can't imbed functions so other procedures can't see them (scoping rules),

Yes, this is true.  Function scope may only be restricted to the source
module level.

|I have to use global variables a lot (taught as a no-no at GT)

Off hand, I can't imagine why you would need any in C that you wouldn't
use in Pascal.  Do you have specific examples showing where you feel you
need them in C but not in Pascal?

|seems like C is TOO flexible! How do you guys get anything done when there are
|about 500 different ways to do it?

I try to pick a way that I feel is easy to read, understand, and maintain.

|Please, open my mind to C!

You'll have to open your own mind.  I gave the last of my drugs to a
previous poster.  :-)

  -- Brian Katzung  katzung@i88.isc.com
From: banshee@cats.ucsc.edu (Wailer at the Gates of Dawn)
Newsgroups: comp.lang.c
Subject: Finding Big Primes
Date: 22 Dec 92 22:48:01 GMT
Organization: University of California, Santa Cruz
NNTP-Posting-Host: am.ucsc.edu


Here is some code using the gmp 2.1 library to find BIG primes.
Mersenne Primes.


/*
 * Pfinder.c -- Mersenne Prime Locator
 * J. Vinopal banshee@cats.UCSC.EDU
 * 1/12/91
 */
#include <stdio.h>
#include "gmp.h"

#define mout(x) (mpz_out_str(stdout, 10, (x)))

main(int argc, char **argv)
{
	MP_INT	Temp_Var, Temp_Var2, Mprime;
	MP_INT	Zero, One, Two, Four;
	MP_INT	startNum;
	long	i, TestPrime, Time1, startPos;
	int	savePos;
	FILE	*primeFile, *compareFile;


	if (((primeFile = fopen(argv[1], "r")) == NULL) || (argc < 2)) {
		printf("Can't read data file.\n");
		exit(0);
	}

/* Initialize MINT Constants */
	mpz_init(&Zero);
	mpz_init_set_si(&One, 1L);
	mpz_init_set_si(&Two, 2L);
	mpz_init_set_si(&Four, 4L);

	mpz_init(&startNum);
	mpz_init(&Temp_Var);
	mpz_init(&Temp_Var2);
	mpz_init(&Mprime);

/* Read a prime number out of the data file */
	while (fscanf(primeFile, " %ld", &TestPrime) != EOF) {

		time(&Time1);	/* Get the starting time */

		/*
		 * Compute Mersenne number
		 * Mp = 2 ** P  - 1
		 */
		mpz_pow_ui(&Temp_Var, &Two, TestPrime);
		mpz_sub(&Mprime, &Temp_Var, &One);

		/*
		 * Starting Conditions.
		 */
			mpz_set(&Temp_Var, &Four);
			i = 2;

		/*
		 * Calculate Mersenne Prime sequence 
		 * Temp_Var = (Temp_Var**2 - 2) % Mprime
		 */
		for (; i < TestPrime; i++) {
			mpz_powm_ui(&Temp_Var2, &Temp_Var, 2L, &Mprime);
			mpz_sub_ui(&Temp_Var, &Temp_Var2, 2L);
		}

/* Produce Results */
		if (mpz_cmp_ui(&Temp_Var, 0L) == 0) {
			printf("Mersenne prime ");
			printf("%d: ", TestPrime);
			mout(&Mprime);
			printf("\n");
		}
		printf("%ld %ld\n", TestPrime, (time(0) - Time1));
		fflush(stdout);
	}
}

-- 
The Wailer at the Gates of Dawn              | banshee@cats.UCSC.EDU       |
Just who ARE you calling a FROOFROO Head?    |                             |
DoD#0667  "Just a friend of the beast."      | banshee@ucscb.UCSC.EDU      |
2,3,5,7,13,17,19,31,61,89,107,127,521,607....| banshee@ucscb.BITNET        |
Newsgroups: comp.lang.c
From: wells@cdsmn.mn.org (Rich Wells)
Subject: Re: a ? b : c = d; /* legal ? */
Organization: Dicomed, Inc
X-Newsreader: TIN [version 1.1 PL6]
Date: Mon, 21 Dec 1992 15:47:46 GMT

Dave E. Webster Jr. (dwebster@optima.UUCP) wrote:
: Rich Wells (that's me) asks:
: 
: > Is the statement:
: > 
: >     a ? b : c = d;
: > 
: > where a, b, c, and d are all integers, a valid C expression?
:   ...
: > ***** Microsoft C (7.0 and 5.1): The statement does not compile.
:   ...
: > ***** Turbo C++ (3.0): The statement is interpreted as:
: > 
: >     if (a)
: >         a = d;
: >     else
: >         b = d;
: 
: Rich,
: 
: Assuming that the TC++ implementation should actually read as:
: 
:      if (a) b = d; else c = d;
:             ^           ^

You are, of course right.  I even had a second person proof-read this
before sending it out.  Sorry about the mistake.  How embarrassing.

: then both of the above compilers are correct.  The Microsoft compiler
: flags an error because the result of the trinary conditional in C is
: an rvalue and cannot be the target of an assignment.  C++ changed the
: rules by defining the result of a trinary conditional as an lvalue of
: type T if (and only if) both the second and third arguments are
: themselves lvalues of a common type (cf arm 5.16).

Thanks for the answer, Dave.

I went back and tested Microsoft C 7.0 again, this time using
.cpp as the file extension.  This time it compiled and ran
as expected for a C++ compiler.  I haven't had time to check to
if TC++'s behavior changes accordingly; although I'm relatively
certain I used a .c extension to get the C++ behavior, I'm not
sure if TC uses the file extension or some internal option setting
to determine whether to allow C++ code or just C code.
-- 

Richard Wells  wells@cdsmn.mn.org  or  ...!tcnet!cdsmn!wells
From: rlmeyering@beckman.com
Newsgroups: comp.lang.c
Subject: VMS c, how to read stream files
Date: 21 Dec 92 18:20:25 PDT
Organization: Beckman Instruments, Inc.

##### PLEASE RESPOND VIA E-MAIL ######

Hi,

I am using this code to open a file for input....

	if ( ( in = fopen( argv[1], "r" ) ) == NULL) {
		printf( "\n%Error: unable to open input file %s", argv[1] );
		exit( 0 );
	}


This is the dir/full listing of the file i'm opening:

TEST.DAT;2                    File ID:  (8558,40,0)       
Size:            1/3          Owner:    [TSS,RLMEYERING]
Created:  21-DEC-1992 17:47:36.44
Revised:  21-DEC-1992 17:47:36.65 (1)
Expires:  21-MAR-1993 17:48:06.90
Backup:    <No backup recorded>
File organization:  Sequential
File attributes:    Allocation: 3, Extend: 0, Global buffer count: 0, Version limit: 2
Record format:      Stream

			  ^^^^^^^^^^^^ (note: , maximum 56 bytes not shown)
					( see other listing below)

Record attributes:  Carriage return carriage control
RMS attributes:     None
Journaling enabled: None
File protection:    System:RWED, Owner:RWED, Group:RE, World:RE
Access Cntrl List:  None

Total of 1 file, 1/3 blocks.


When I do the following:

	ch=fgetc(in);
	
	ch is returned == EOF.

A $dump/hex/byte of the file shows bytes:

	1 = 0x88
	2 = '?'
	3 = 'H'
	4 = 0x88

If I do an anal/rms/fdl test.dat
then change the organization (with edit/fdl) to SEQUENTIAL

followed by: 

convert/fdl test.dat test.dat;0

I get the file shown below:

TEST.DAT;3                    File ID:  (8990,282,0)       
Size:            1/3          Owner:    [TSS,RLMEYERING]
Created:  21-DEC-1992 17:50:36.44
Revised:  21-DEC-1992 17:50:36.65 (1)
Expires:  21-MAR-1993 17:50:06.90
Backup:    <No backup recorded>
File organization:  Sequential
File attributes:    Allocation: 3, Extend: 0, Global buffer count: 0, Version limit: 2
Record format:      Stream, maximum 56 bytes

			  ^^^^^^^^^^^^^^^^^^ this appears to be the only
					     difference.

Record attributes:  Carriage return carriage control
RMS attributes:     None
Journaling enabled: None
File protection:    System:RWED, Owner:RWED, Group:RE, World:RE
Access Cntrl List:  None

Total of 1 file, 1/3 blocks.


After the convert/fdl... my program can read the file.

Does anyone know what is going on?

					RLMeyering
From: hartman@ulogic.UUCP (Richard M. Hartman)
Newsgroups: comp.lang.c
Subject: Re: C code Layout
Date: 29 Dec 92 22:25:18 GMT
Organization: negligable

Consistancy is an excellant point.
Depending upon the size of the changes I am attempting,
or how long I think I will be working with the module
I either use the existing style for my mods, or change
the whole thing over to the style I am most comfortable
with.

		-Richard Hartman
		hartman@ulogic.COM

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Nobody has ever had a sexual fantasy about being tied
 to a bed and ravished by somebody dressed as a liberal."    -P.J. O'Rourke
From: dave@cs.arizona.edu (Dave Schaumann)
Newsgroups: comp.lang.c
Subject: Re: Parameter passing & data abstraction
Date: 1 Jan 93 00:26:06 GMT
Reply-To: dave@cs.arizona.edu (Dave Schaumann)
Organization: University of Arizona

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!