]> granicus.if.org Git - re2c/commit
Yet another explicit cast of pointer difference to uint32_t.
authorUlya Trofimovich <skvadrik@gmail.com>
Mon, 10 Aug 2015 10:41:51 +0000 (11:41 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Mon, 10 Aug 2015 10:41:51 +0000 (11:41 +0100)
commit75c3a63b59730d40659d88befa1960ff3d7abfca
treeb708c726260ee3e5a408e8223982a2ad6fe8a7fc
parentce7e9d37b3f4948a4479f11df7d80b9e3c11f91c
Yet another explicit cast of pointer difference to uint32_t.

This time we deal with pointers in 'Ins' array (the length of array
equals the calculated size of regular expression, which is currently
of type uint32_t: larger regular expressions will surely crash re2c).

So we can guarantee that, if regexp was correctly compiled to instructions,
than the first pointer points to some instuction in the array and second
pointer points to the beginning of array, so this cast is safe.

If compilation was incorrect than re2c will fail anyway.

Fixes [-Wconversion] warning.
re2c/src/ir/bytecode/bytecode.cc