Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ulysses!hector!jss From: jss@hector.UUCP (Jerry Schwarz) Newsgroups: comp.lang.c++ Subject: Re: Legal initializer? Keywords: initialization initializer new Message-ID: <11482@ulysses.homer.nj.att.com> Date: 3 May 89 14:58:51 GMT References: <161@mole-end.UUCP> Sender: netnews@ulysses.homer.nj.att.com Reply-To: jss@hector.UUCP (Jerry Schwarz) Organization: AT&T Bell Laboratories Lines: 35 In article <161@mole-end.UUCP> mat@mole-end.UUCP (Mark A Terribile) asks about ------------- class My_buf { public: const int size; char *const buffer; My_buf( int ); }; Now, is this constructor legal? My_buf::My_buf( int sz ) : size( sz ), buffer( new char[ sz ] ) {} ------------- Yes its legal. >cfront (the Glockenspiel port) quietly generates bad code: > Anytime a cfront based compiler quietly generates bad C it is a bug in cfront. This is what we mean when we say that cfront is a compiler not a preprocessor. This is true even if the C++ program being compiled was itself in error in some way. Jerry Schwarz AT&T Bell Labs, Murray Hill