]> git.sur5r.net Git - cc65/commit
Fixed a pointer-difference, comparison-with-zero expression. 391/head
authorGreg King <gregdk@users.sf.net>
Wed, 1 Mar 2017 11:36:25 +0000 (06:36 -0500)
committerGreg King <gregdk@users.sf.net>
Wed, 1 Mar 2017 11:52:43 +0000 (06:52 -0500)
commit8f0ea644dddfaf9c41718ff055f4b77f0b8f43ad
tree8aaade562c0a9b0c1f2c409460b8b1d16e626e2b
parent99f3c7d01d598061ff386a3b057b6db43e759eb0
Fixed a pointer-difference, comparison-with-zero expression.

Some GCC C compilers can't subtract higher pointers from lower pointers properly, when those pointers must be scaled (because they point to objects that are wider than a char). The scaling is done as unsigned which makes the difference positive instead of negative.

So, a broken expression was changed into a direct comparison between the two pointers.
test/ref/yacc.c