From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4858 invoked by alias); 3 Jun 2002 15:36: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 4837 invoked by uid 71); 3 Jun 2002 15:36:01 -0000 Resent-Date: 3 Jun 2002 15:36:01 -0000 Resent-Message-ID: <20020603153601.4836.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, kent@iastate.edu Received:(qmail 2119 invoked by uid 61); 3 Jun 2002 15:31:19 -0000 Message-Id:<20020603153119.2118.qmail@sources.redhat.com> Date: Mon, 03 Jun 2002 08:36:00 -0000 From: kent@iastate.edu Reply-To: kent@iastate.edu To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/6923: Ex of g++ 3.1 not compiling apparently valid code X-SW-Source: 2002-06/txt/msg00071.txt.bz2 List-Id: >Number: 6923 >Category: c++ >Synopsis: Ex of g++ 3.1 not compiling apparently valid code >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon Jun 03 08:36:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Kent Vander Velden >Release: 3.1 >Organization: >Environment: SunOS sun05 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-Enterprise >Description: The following code does not compile with g++ 3.1. The error message is: graph_viewer|Mon10:30am} g++ -c test.cpptest.cpp: In function `void ex()': test.cpp:11: parse error before `*' token class QRect { public: QRect(int, int, int, int) {} }; void ex() { double x_[10], y_[10]; int w, h, ns_, i; // Does not work: QRect bb2(int(x_[i]*w), int(y_[i]*h), ns_, ns_); // Does work: //QRect bb2(int(w*x_[i]), int(y_[i]*h), ns_, ns_); // Does work: //QRect bb2((int)(x_[i]*w), int(y_[i]*h), ns_, ns_); // Does work: //QRect bb2((int)(w*x_[i]), int(y_[i]*h), ns_, ns_); } >How-To-Repeat: Compile the code and see :) >Fix: >Release-Note: >Audit-Trail: >Unformatted: