public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/6923: Ex of g++ 3.1 not compiling apparently valid code
@ 2002-06-03 8:36 kent
0 siblings, 0 replies; only message in thread
From: kent @ 2002-06-03 8:36 UTC (permalink / raw)
To: gcc-gnats
>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:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-06-03 15:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-03 8:36 c++/6923: Ex of g++ 3.1 not compiling apparently valid code kent
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).