This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/8100: a valid operator definition is rejected.
- From: cdevienne at alphacent dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 30 Sep 2002 18:02:56 -0000
- Subject: c++/8100: a valid operator definition is rejected.
- Reply-to: cdevienne at alphacent dot com
>Number: 8100
>Category: c++
>Synopsis: a valid operator definition is rejected.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Mon Sep 30 11:06:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Christophe de Vienne
>Release: G++ 3.2
>Organization:
>Environment:
System: Slackware Current. glibc 2.2.5.
kernel: 2.4.19.
Arch: Bi-Athlon 2000+
>Description:
When tring to compile the given processed file, I get the following errors.
The most strange to me is that if I isolate the definition of QpException and the ostream&operator<<(ostream&o,const QpException &) in a single file, everything is fine. I guess there is a side effect but I couldn't find where does it comes from.
It works fine with g++ 2.95.3
In file included from qpthr/qp.h:55,
from qp.cc:9:
qpthr/qp_except.h: In function `std::ostream& qpthr::operator<<(std::ostream&,
const qpthr::QpException&)':
qpthr/qp_except.h:59: invalid conversion from `const char*' to `int'
qpthr/qp_except.h:59: initializing argument 1 of `
qpthr::QpException::QpException(int, const char*)'
qpthr/qp_except.h:59: cannot allocate an object of type `const
qpthr::QpException'
qpthr/qp_except.h:59: because the following virtual functions are abstract:
qpthr/qp_except.h:55: virtual const char* qpthr::QpException::ErrType() const
qpthr/qp_except.h:59: invalid conversion from `const char*' to `int'
qpthr/qp_except.h:59: initializing argument 1 of `
qpthr::QpException::QpException(int, const char*)'
qpthr/qp_except.h:59: cannot allocate an object of type `const
qpthr::QpException'
qpthr/qp_except.h:59: since type `const qpthr::QpException' has abstract
virtual functions
qpthr/qp_except.h:59: cannot allocate an object of type `const
qpthr::QpException'
qpthr/qp_except.h:59: since type `const qpthr::QpException' has abstract
virtual functions
qpthr/qp_except.h:59: invalid conversion from `const char*' to `int'
qpthr/qp_except.h:59: initializing argument 1 of `
qpthr::QpException::QpException(int, const char*)'
qpthr/qp_except.h:59: cannot allocate an object of type `const
qpthr::QpException'
qpthr/qp_except.h:59: since type `const qpthr::QpException' has abstract
virtual functions
qpthr/qp_except.h:59: invalid conversion from `const char*' to `int'
qpthr/qp_except.h:59: initializing argument 1 of `
qpthr::QpException::QpException(int, const char*)'
qpthr/qp_except.h:59: cannot allocate an object of type `const
qpthr::QpException'
qpthr/qp_except.h:59: since type `const qpthr::QpException' has abstract
virtual functions
>How-To-Repeat:
g++ -fPIC -Wall -O2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_SVID_SOURCE -DARCH_TAS -DLINUX -I. -c -o qp.o qp.i
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: