rui314 / 8cc

A Small C Compiler
MIT License
6.13k stars 740 forks source link

Fix an issue with compound assignment operators. #20

Closed andrewchambers closed 9 years ago

andrewchambers commented 9 years ago

If the left arith type of a compound assignment had less bits than an int, an assertion in usual_arith_conv was triggered. This was because the left type was not promoted correctly.

andrewchambers commented 9 years ago

I removed the line, there was also an error in .gitigore which I fixed in a different commit as it is unrelated.

rui314 commented 9 years ago

I'm using the present form in the commit message for this repo, I just wanted to keep it consistent. I'll merge this pull request later.

andrewchambers commented 9 years ago

thanks :)

rui314 commented 9 years ago

Rebased and merged.