chatty%FRLRI61.BITNET@cunyvm.cuny.edu (10/20/89)
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