This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

no match for `bool ? Wpt : const Wpt &


I got what I think is a g++ compiler error building g++ from the CVS sources
as of 6:08 pm EDT on Tues, July 27.

Version:
gcc version 2.96 19990727 (experimental) on sparc-sun-solaris2.7

Options:
% g++ bug.C
bug.C: In method `class Wpt RAYhit::surf() const':
bug.C:7: no match for `bool ? Wpt : const Wpt &'


Thanks,
Loring
PS-

The source:
class Wpt {};

class RAYhit {
   protected:
      Wpt       _nearpt;
   public:
      Wpt       surf        () const { return true ? Wpt(): _nearpt; } 
};



g++ -v --save-temps bug.C output:
Reading specs from /u/lsh/space/apps/egcs/lib/gcc-lib/sparc-sun-solaris2.7/2.96/specs
gcc version 2.96 19990727 (experimental)
 /u/lsh/space/apps/egcs/lib/gcc-lib/sparc-sun-solaris2.7/2.96/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=96 -D__cplusplus -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -D__EXCEPTIONS -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) bug.C bug.ii
GNU CPP version 2.96 19990727 (experimental) (sparc)
#include "..." search starts here:
#include <...> search starts here:
 /u/lsh/space/apps/egcs/lib/gcc-lib/sparc-sun-solaris2.7/2.96/../../../../include/g++-3
 /usr/local/include
 /u/lsh/space/apps/egcs/lib/gcc-lib/sparc-sun-solaris2.7/2.96/../../../../sparc-sun-solaris2.7/include
 /u/lsh/space/apps/egcs/lib/gcc-lib/sparc-sun-solaris2.7/2.96/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
 /u/lsh/space/apps/egcs/lib/gcc-lib/sparc-sun-solaris2.7/2.96/cc1plus bug.ii -quiet -dumpbase bug.cc -version -o bug.s
GNU C++ version 2.96 19990727 (experimental) (sparc-sun-solaris2.7) compiled by GNU C version 2.96 19990727 (experimental).
bug.C: In method `class Wpt RAYhit::surf() const':
bug.C:7: no match for `bool ? Wpt : const Wpt &'


bug.ii file:
# 1 "bug.C"
class Wpt {};

class RAYhit {
   protected:
      Wpt       _nearpt;
   public:
      Wpt       surf        () const { return true ? Wpt(): _nearpt; } 
};

bug.s file:
	.file	"bug.C"
gcc2_compiled.:

.section	".eh_frame",#alloc,#write
__FRAME_BEGIN__:
	.uaword	.LLECIE1-.LLSCIE1
.LLSCIE1:
	.uaword	0x0
	.byte	0x1
	.byte	0x0
	.byte	0x1
	.byte	0x7c
	.byte	0x65
	.byte	0xc
	.byte	0xe
	.byte	0x0
	.byte	0x9
	.byte	0x65
	.byte	0xf
	.align 4
.LLECIE1:
	.ident	"GCC: (GNU) 2.96 19990727 (experimental)"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]