This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/2478: class QRect {
- From: paolo at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, kengole at us dot ibm dot com, nobody at gcc dot gnu dot org
- Date: 1 Jan 2003 21:55:03 -0000
- Subject: Re: c++/2478: class QRect {
- Public: QRect(int, int, int, int) {}
- Reply-to: paolo at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, kengole at us dot ibm dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
};
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_);
[2003-01-01] [parser] array declarator confusion
Old Synopsis: [parser] array declarator confusion
New Synopsis: 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_);
[2003-01-01] [parser] array declarator confusion
State-Changed-From-To: suspended->analyzed
State-Changed-By: paolo
State-Changed-When: Wed Jan 1 13:55:02 2003
State-Changed-Why:
Still present in mainline after the new parser merge.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=2478