Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!ucsd!sdcsvax!ucsdhub!hp-sdd!hplabs!hp-pcd!hplsla!jima From: jima@hplsla.HP.COM ( Jim Adcock) Newsgroups: comp.lang.c++ Subject: Re: elementary question about c++ Message-ID: <6590038@hplsla.HP.COM> Date: 20 Apr 88 01:05:58 GMT References: <1297@tekirl.TEK.COM> Organization: HP Lake Stevens, WA Lines: 19 | It should print | | c.value = 1000000 | | In the line marked with *****, c is initialized to be a copy of whatever | bar() returns. Okay, given that my local copy of the AT&T compiler (v1.2 ?) clearly generates intermediate C code that performs the destructor operation [setting c.value to zero] before the return of the function, thus printing: c.value = 0 is this a bug, or what ? How WOULD one generate C code for this operation -- returning the value of a structure, yet destroying the value of that structure before the function returns ?