Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!lll-lcc!qantel!hplabs!tektronix!uw-beaver!cornell!rochester!sher From: sher@rochester.ARPA (David Sher) Newsgroups: net.lang.c++ Subject: Bug in 1.0 compiler Message-ID: <20808@rochester.ARPA> Date: Sun, 14-Sep-86 23:29:53 EDT Article-I.D.: rocheste.20808 Posted: Sun Sep 14 23:29:53 1986 Date-Received: Fri, 19-Sep-86 23:03:46 EDT Reply-To: sher@rochester.UUCP (David Sher) Distribution: na Organization: U of Rochester, CS Dept, Rochester, NY Lines: 26 This piece of code generates incorrect C code. The fact that it is incorrect C++ code is no excuse since it involves a type violation that cfront should catch (an (int ()) is not an int). We have not yet recieved or installed the 1.1 C++ (I don't know whether we've got it yet). The code is thus: #include #include class foo { int cat; public: foo( int x , int y ) { cat = x + y; } const int sile() { return sile; } }; main() { foo x(1,7); cout << x.sile(); } -- -David Sher sher@rochester {allegra,seismo}!rochester!sher