This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/2478: class QRect {


};

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]