public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: cdevienne@alphacent.com
To: gcc-gnats@gcc.gnu.org
Subject: c++/8100: a valid operator definition is rejected.
Date: Mon, 30 Sep 2002 11:06:00 -0000	[thread overview]
Message-ID: <20020930180256.6536.qmail@sources.redhat.com> (raw)


>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:


             reply	other threads:[~2002-09-30 18:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-30 11:06 cdevienne [this message]
2002-09-30 14:06 Christophe de Vienne
2002-09-30 14:46 paolo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020930180256.6536.qmail@sources.redhat.com \
    --to=cdevienne@alphacent.com \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).