ableC icon indicating copy to clipboard operation
ableC copied to clipboard

Missing type-checking for binary operators

Open krame505 opened this issue 8 years ago • 3 comments

Currently we aren't doing any error checking on binary operators other than AssignOps (and these lack checking for things such as += for whether addition is valid).

I'm not sure what the best way to structure this would be - on all the BinOp productions, just check if top.typerep is errorType() and top.lop.typerep and top.rop.typerep are not, and if so raise an error? @tedinski what was the original plan for this?

krame505 avatar May 29 '17 17:05 krame505

I don't think there was a plan. If you need to, we can chat Thursday.

On May 29, 2017 12:02 PM, "Lucas Kramer" [email protected] wrote:

Currently we aren't doing any error checking on binary operators other than AssignOps (and these lack checking for things such as += for whether addition is valid).

I'm not sure what the best way to structure this would be - on all the BinOp productions, just check if top.typerep is errorType() and top.lop.typerep and top.rop.typerep are not, and if so raise an error? @tedinski https://github.com/tedinski what was the original plan for this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/melt-umn/ableC/issues/46, or mute the thread https://github.com/notifications/unsubscribe-auth/ABcD7flO-Pm07fkQYjBEpePPFL9SIWk_ks5r-vovgaJpZM4Npf1_ .

tedinski avatar May 29 '17 17:05 tedinski

I'm not going to be around to chat much over the summer... Regardless, this isn't something that I have time to fix right now, I just wanted to make a note of what needs to be done. Does this fix I mentioned seem reasonable, or do you think we should do all the pattern-matching on operand types and error checking explicitly?

Lucas Kramer

On Mon, May 29, 2017 at 12:10 PM, Ted Kaminski [email protected] wrote:

I don't think there was a plan. If you need to, we can chat Thursday.

On May 29, 2017 12:02 PM, "Lucas Kramer" [email protected] wrote:

Currently we aren't doing any error checking on binary operators other than AssignOps (and these lack checking for things such as += for whether addition is valid).

I'm not sure what the best way to structure this would be - on all the BinOp productions, just check if top.typerep is errorType() and top.lop.typerep and top.rop.typerep are not, and if so raise an error? @tedinski https://github.com/tedinski what was the original plan for this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/melt-umn/ableC/issues/46, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABcD7flO- Pm07fkQYjBEpePPFL9SIWk_ks5r-vovgaJpZM4Npf1_> .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/melt-umn/ableC/issues/46#issuecomment-304702465, or mute the thread https://github.com/notifications/unsubscribe-auth/AIE1iugzlba6O1CVYgaFu2v0ybpDwQTqks5r-vwJgaJpZM4Npf1_ .

krame505 avatar May 29 '17 17:05 krame505

Ah, I don't really know. This is probably, "go look at the standard or clang" territory.

tedinski avatar May 29 '17 17:05 tedinski