gcc rejects following valid code.

//test.c
struct foo
{
  int operator[](int) const { return 0; }
};

int main()
{
  (foo()[0]);
  return 0;
}


-- 
           Summary: Parentheses-enclosed expression.
           Product: gcc
           Version: 4.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: s__nakayama at infoseek dot jp


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

Reply via email to