From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24916 invoked by alias); 18 Mar 2003 14:06:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 24881 invoked by uid 71); 18 Mar 2003 14:06:01 -0000 Resent-Date: 18 Mar 2003 14:06:01 -0000 Resent-Message-ID: <20030318140601.24879.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, redwards@astro.uva.nl Received: (qmail 21862 invoked by uid 48); 18 Mar 2003 14:05:11 -0000 Message-Id: <20030318140511.21858.qmail@sources.redhat.com> Date: Tue, 18 Mar 2003 14:06:00 -0000 From: redwards@astro.uva.nl Reply-To: redwards@astro.uva.nl To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/10136: Over-pedantic overloading errors X-SW-Source: 2003-03/txt/msg01213.txt.bz2 List-Id: >Number: 10136 >Category: c++ >Synopsis: Over-pedantic overloading errors >Confidential: no >Severity: critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Mar 18 14:06:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: R. Edwards >Release: 3.2 >Organization: >Environment: i486-suse-linux >Description: Sorry I don't know the ins and outs of the Standard well enough to know if this is a "new bug" and not just an "annoying new feature", but the fact that the following code dies with an error message seems strange to me. #include void f() { float a, b=1.0; a = std::pow(b, 1.5); } Surely the compiler should just promote b to a double without even emitting a warning message? If not, what is the proper way to do this? Stick (double) in a zillion places in the code? Also, the error message for this kind of error is pretty cryptic, especially in the case of operators. Here is an example from my code, which is much too big and ugly to supply here: pbird.cc:102: choosing `PhysData::PhysDataPoint PhysData::operator*(const PhysData::PhysDataPoint&, double) [with T = double]' over `operator*' pbird.cc:102: because worst conversion for the former is better than worst conversion for the latter Firstly, great you made the right choice, why are you giving an error message about it?? Secondly, choosing it over _which_ operator* ?? (I know there is a previous bug report on this but no progress seemed to be made) >How-To-Repeat: g++ -c (file containing fragment in description) >Fix: >Release-Note: >Audit-Trail: >Unformatted: