I've attached a patch, which would reduce gcc -Wconversion
compiler warnings quite a bit, when compiling flex generated c code.
I disagree a bit with the attitude:
"compiler warnings on flex generated c code are not flex bugs"
When flex is used in a large project, then those warnings
can create quite some noise, and seriously distract attention
from important stuff.
An easy exercise for the attached patch,
is to have a look at flex's own scan.l with
make ; rm scan.c ; make CFLAGS='-O2 -Wconversion'