Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!apple!motcsd!hpda!hpcuhb!hpcllla!hpclisp!hpclscu!shankar From: shankar@hpclscu.HP.COM (Shankar Unni) Newsgroups: comp.lang.c++ Subject: Re: Does C++ 2.0 Emit Following C Construct? Message-ID: <1000032@hpclscu.HP.COM> Date: 9 Oct 89 23:27:42 GMT References: <32793@cornell.UUCP> Organization: Hewlett-Packard Calif. Language Lab Lines: 26 > Try this little gem (but first make sure that your CC script does *not* > invoke the GNU C compiler): > > int i; > int main () > { > i = sizeof (main); > return 0; > } I got perfectly reasonable code from 2.0 (formatting cleaned up): int main () { _main(); { i = (sizeof main ); return (int )0 ; } } Looks kosher. You mean your compiler choked on "(sizeof main)"? ----- Shankar Unni E-Mail: Hewlett-Packard California Language Lab. Internet: shankar@hpda.hp.com Phone : (408) 447-5797 UUCP: ...!hplabs!hpda!shankar