From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13313 invoked by alias); 7 Aug 2002 15:46:09 -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 13246 invoked by uid 71); 7 Aug 2002 15:46:05 -0000 Resent-Date: 7 Aug 2002 15:46:04 -0000 Resent-Message-ID: <20020807154604.13245.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, braden@endoframe.com Received: (qmail 10827 invoked by uid 61); 7 Aug 2002 15:36:39 -0000 Message-Id: <20020807153639.10826.qmail@sources.redhat.com> Date: Wed, 07 Aug 2002 08:56:00 -0000 From: braden@endoframe.com Reply-To: braden@endoframe.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/7524: "f(const float arg[3])" fails X-SW-Source: 2002-08/txt/msg00136.txt.bz2 List-Id: >Number: 7524 >Category: c++ >Synopsis: "f(const float arg[3])" fails >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Wed Aug 07 08:46:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: braden@endoframe.com >Release: 3.1.1 >Organization: >Environment: >Description: In the attached demonstration case, g++ is having problems with function argument declarations of the form f(const float arg[3]); Peculiarly, g++ is able to compile the code if the "assign" method in the example is removed. >How-To-Repeat: See attached test case. >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="test.cc" Content-Disposition: inline; filename="test.cc" # include # include # include class FieldValue { public: virtual ~FieldValue() throw () = 0; virtual FieldValue & assign(const FieldValue & value) throw (std::bad_cast, std::bad_alloc) = 0; }; class SFColor : public FieldValue { float d_rgb[3]; public: static void HSVtoRGB(const float hsv[3], float rgb[3]) throw (); static void RGBtoHSV(const float rgb[3], float hsv[3]) throw (); SFColor() throw (); virtual ~SFColor() throw (); // Use compiler-defined copy ctor and operator=. void set(const float rgb[3]) throw (); virtual FieldValue & assign(const FieldValue & value) throw (std::bad_cast); }; FieldValue::~FieldValue() throw () {} SFColor::SFColor() throw () { this->d_rgb[0] = 0.0f; this->d_rgb[1] = 0.0f; this->d_rgb[2] = 0.0f; } SFColor::~SFColor() throw () {} FieldValue & SFColor::assign(const FieldValue & value) throw (std::bad_cast) { return (*this = dynamic_cast(value)); } void SFColor::set(const float rgb[3]) throw () { this->d_rgb[0] = rgb[0]; this->d_rgb[1] = rgb[1]; this->d_rgb[2] = rgb[2]; } void SFColor::HSVtoRGB(const float hsv[3], float rgb[3]) throw () {} void SFColor::RGBtoHSV(const float rgb[3], float hsv[3]) throw () {} int main() {}