🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by chatty%FRLRI61.BITNET Fri, 20 Oct 1989 14:24
Incompatibility between 1.35 and 1.36
#521
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads