🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.c++
Article #316

Bug in 1.0 compiler

#316
From: David Sher
Date: Mon, 15 Sep 1986 03:29
26 lines
1170 bytes
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 <stream.h>
#include <stdio.h>

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
Technical Details
Message-ID: <20808@rochester.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!lll-lcc!qantel!hplabs!tektronix!uw-beaver!cornell!rochester!sher

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!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