🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #521

Incompatibility between 1.35 and 1.36

#521
From: chatty%FRLRI61.BITNET
Date: Fri, 20 Oct 1989 14:24
45 lines
1433 bytes
The following code was accepted by g++ 1.35.1- (and it worked!),
and it is refused by the latest g++ 1.36.0-. Which one should I
follow?


typedef int FOO (int);

class A {
public:
        A (FOO);
};

class B : public A {
public:
        B (FOO);
};

static int
bar (int b)
{
        return b;
}

B :: B (FOO f)
: ((f ? f : bar))
{
}


% g++ -v a.cc
gcc version 1.36.0- (based on GCC 1.36)
 /usr/local/lib/GNU/cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dsparc
 -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ a.cc /usr/tmp/cca27784.cpp
GNU CPP version 1.36
 /usr/local/lib/GNU/cc1plus /usr/tmp/cca27784.cpp -quiet -dumpbase a.cc -version
 -o /usr/tmp/cca27784.s
GNU C++ version 1.36.0- (based on GCC 1.36) (sparc) compiled by GNU C version 1.
36.
default target switches: -mfpu -mepilogue
a.cc: In method B::B (auto int (*)(int )):
a.cc:20: type mismatch in conditional expression


Stephane Chatty         chatty@lri.lri.fr
                        chatty@frlri61.bitnet
Technical Details
Message-ID: <8910201424.AA27880@lri.lri.fr>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!cunyvm.cuny.edu!chatty%FRLRI61.BITNET

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!cunyvm.cuny.edu!chatty%FRLRI61.BITNET
From: chatty%FRLRI61.BITNET@cunyvm.cuny.edu
Newsgroups: gnu.g++.bug
Subject: Incompatibility between 1.35 and 1.36
Message-ID: <8910201424.AA27880@lri.lri.fr>
Date: 20 Oct 89 14:24:21 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 45