[Bug c++/14385] New: Parse errors encountered where there shouldn't be

shayne dot fletcher at rbos dot com gcc-bugzilla@gcc.gnu.org
Tue Mar 2 15:04:00 GMT 2004


Parse error encountered. The following program demonstrates the problem:

struct date
{
  date(long l) {}
};

struct period
{
  period(const date& s, const date& e) {}
};

void f()
{
  long I = 0L, J = 0L, arr[1] = {0L};

  period p(date(I), date(J)); // succeeds
  period r(date(0L), date(J)); // succeeds
  period s(date(0L), date(0L)); // succeeds
  period t(date(arr[0]), date(arr[0])); // succeeds

  period q(date(I), date(0L)); // fails: parse error
  //period u(date(arr[0]), date(0L)); // fails: parse error
}

int main()
{
  return 0;
}

-- 
           Summary: Parse errors encountered where there shouldn't be
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: shayne dot fletcher at rbos dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14385



More information about the Gcc-bugs mailing list