| Submitter | Ian Taylor |
|---|---|
| Date | March 25, 2011, 7:23 p.m. |
| Message ID | <mcr39mbdmxd.fsf@google.com> |
| Download | mbox | patch |
| Permalink | /patch/88410/ |
| State | New |
| Headers | show |
Comments
Patch
diff -r 31aaf6e2aa75 go/expressions.cc --- a/go/expressions.cc Fri Mar 25 10:32:02 2011 -0700 +++ b/go/expressions.cc Fri Mar 25 12:20:47 2011 -0700 @@ -5747,7 +5747,13 @@ if (this->right_->integer_constant_value(true, val, &type)) { if (mpz_sgn(val) < 0) - this->report_error(_("negative shift count")); + { + this->report_error(_("negative shift count")); + mpz_set_ui(val, 0); + source_location rloc = this->right_->location(); + this->right_ = Expression::make_integer(&val, right_type, + rloc); + } } mpz_clear(val); }