public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pcarlini at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/22256] diagnostic shows wrong type for cast operator
Date: Mon, 06 Aug 2007 11:52:00 -0000	[thread overview]
Message-ID: <20070806115218.16446.qmail@sourceware.org> (raw)
In-Reply-To: <bug-22256-6594@http.gcc.gnu.org/bugzilla/>



------- Comment #6 from pcarlini at suse dot de  2007-08-06 11:52 -------
The subtle issue here is that this specific error message should be emitted
*only* when the incorrectly specified return type doesn't match, thus a plain
error instead of a pedwarn:

    case sfk_conversion:
      if (type && !same_type_p (type, optype))
        error ("operator %qT declared to return %qT", optype, type);
      else if (type)
        pedwarn ("return type specified for %<operator %T%>",  optype);
      type = optype;

but for some reason the thing doesn't work... I'm looking a bit into it.


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pcarlini at suse dot de
                   |dot org                     |
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22256


       reply	other threads:[~2007-08-06 11:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-22256-6594@http.gcc.gnu.org/bugzilla/>
2007-08-06 11:52 ` pcarlini at suse dot de [this message]
2007-08-10  8:57 ` [Bug c++/22256] diagnostic shows wrong type for conversion operator paolo at gcc dot gnu dot org
2007-08-10  8:58 ` pcarlini at suse dot de
2005-06-30 16:30 [Bug c++/22256] New: diagnostic shows wrong type igodard at pacbell dot net
2005-06-30 17:45 ` [Bug c++/22256] diagnostic shows wrong type for cast operator pinskia at gcc dot gnu dot org
2005-06-30 20:56 ` gdr at integrable-solutions dot net
2005-06-30 21:48 ` igodard at pacbell dot net
2005-06-30 22:11   ` Gabriel Dos Reis
2005-06-30 22:11 ` gdr at integrable-solutions dot net

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=20070806115218.16446.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).