OSDN Git Service

compiler: Accept trailing comma after expression in type conversion.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Dec 2012 01:09:54 +0000 (01:09 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Dec 2012 01:09:54 +0000 (01:09 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@194177 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/go/gofrontend/parse.cc

index ab2bb7c..c65325d 100644 (file)
@@ -2955,6 +2955,8 @@ Parse::primary_expr(bool may_be_sink, bool may_be_composite_lit,
          this->advance_token();
          Expression* expr = this->expression(PRECEDENCE_NORMAL, false, true,
                                              NULL);
          this->advance_token();
          Expression* expr = this->expression(PRECEDENCE_NORMAL, false, true,
                                              NULL);
+         if (this->peek_token()->is_op(OPERATOR_COMMA))
+           this->advance_token();
          if (this->peek_token()->is_op(OPERATOR_ELLIPSIS))
            {
              error_at(this->location(),
          if (this->peek_token()->is_op(OPERATOR_ELLIPSIS))
            {
              error_at(this->location(),