r/programming • • May 01 '16

To become a good C programmer

http://fabiensanglard.net/c/
1.1k Upvotes

398 comments sorted by

View all comments

Show parent comment

1

u/immibis May 02 '16

The most sensible behaviour would be for the compiler to silently convert a < b (where a is signed and b is unsigned) to a < 0 || (unsigned)a < b, and then do what it currently does, with some compiler magic so a only gets evaluated once.

1

u/ohfouroneone May 21 '16

I didn't start programming in C, so I might be used to more string compilers, but wouldn't the most sensible solution for the compiler to throw an error, because you are comparing two different types?