From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17065 invoked by alias); 6 Aug 2007 11:52:29 -0000 Received: (qmail 16447 invoked by uid 48); 6 Aug 2007 11:52:18 -0000 Date: Mon, 06 Aug 2007 11:52:00 -0000 Message-ID: <20070806115218.16446.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/22256] diagnostic shows wrong type for cast operator In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pcarlini at suse dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00348.txt.bz2 ------- 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 %", 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