On Sun, Jul 21, 2019 at 04:49:48AM -0400, Thomas Dickey wrote:
> On Sun, Jul 21, 2019 at 03:01:57PM +1000, Brendan O'Dea wrote:
> > On Sat, Jul 20, 2019 at 01:10:19PM -0400, Thomas Dickey wrote:
> > >Actually it's debatable whether flex "new" is maintained.
> > 
> > I did a test build against the current version (2.6.4), and it no longer has
> > the issue[0] which caused me to revert to flex-old some time ago.
> > 
> > Some brief testing of a handful of modes (mail, ada, html, c) appears to 
> > work
> > pretty much the same as the package built with flex-old.  There may be 
> > subtle
> > behaviour changes which I didn't see, but the egregious symbol naming issue 
> > is
> > gone.  I don't recall if that was changed in flex, or worked around in
> > configure at this point.
> 
> I'm unsure - I'll take a look to see if bisecting flex shows me a change.

fwiw, in a quick check most of the warnings were addressed.
I "only" get a little more than twice as many warnings in a build
as with reflex (I don't use flex-old, of course).

Comparing the warnings, most of those are due to an unused function
(which may be something that can be suppressed).  But there's also
some warnings about an implicit fallthrough.

That would still make new-flex the largest contributor to compiler warnings
in my builds (about 50% more than the perl add-on).
 
> > Note that there seem to have been quite a few changes made to flex since I
> > last used it, and it appears to produce code with less warnings now than
> > flex-old does (using these[1] gcc warning flags).  I'll note that some are
> > conversion flags, and you've suggested that there may be issues with those,
> > but there are still fewer in the newer flex.
> 
> thanks (I'll check on that, too)
>  
> > Compilation output of awk-filt.l attached for both.
> > 
> > I can't think of a compelling reason at this point to stick with flex-old, 
> > so
> > will upload a new package with the build-dependency changed and see how that
> > goes.
> > 
> > --bod
> > 
> > [0] http://bugs.debian.org/832973
> > [1] https://invisible-island.net/personal/lint-tools.html#tool_gcc
> 
> > /bin/sh ../../plink.sh gcc -Wall -Wstrict-prototypes -Wmissing-prototypes 
> > -Wshadow -Wconversion -rdynamic   -o vile-au3-filt.so -shared au3-filt.o
> > compiling awk-filt.l
> > echo '#include <flt_defs.h>' > awk-filt.c
> > flex -Pawk_ -t ../../filters/awk-filt.l >> awk-filt.c
> > gcc -c -fPIC -I. -I.. -I../../filters -I../.. -DHAVE_CONFIG_H 
> > -I../../filters/filters -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 
> > -D_FILE_OFFSET_BITS=64 -I../../filters/filters -Wall -Wstrict-prototypes 
> > -Wmissing-prototypes -Wshadow -Wconversion -rdynamic  
> > -Dfilter_def=define_awk -Dprivate_yywrap=awk_wrap ./awk-filt.c
> > ../../filters/awk-filt.l: In function ‘awk_lex’:
> > ../../filters/awk-filt.l:92:28: warning: conversion from ‘int’ to ‘YY_CHAR’ 
> > {aka ‘unsigned char’} may change value [-Wconversion]
> >  
> >                             ^    
> > ../../filters/awk-filt.l:102:13: warning: conversion from ‘int’ to 
> > ‘YY_CHAR’ {aka ‘unsigned char’} may change value [-Wconversion]
> >      pop_state();
> >              ^~~~   
> > ../../filters/awk-filt.l:104:56: warning: conversion to ‘unsigned int’ from 
> > ‘short int’ may change the sign of the result [-Wsign-conversion]
> >  
> >                                                         ^
> > ../../filters/awk-filt.l: In function ‘yy_get_next_buffer’:
> > ../../filters/awk-filt.l:282:35: warning: conversion to ‘yy_size_t’ {aka 
> > ‘unsigned int’} from ‘int’ may change the sign of the result 
> > [-Wsign-conversion]
> > ../../filters/awk-filt.l:282:4: warning: conversion to ‘int’ from 
> > ‘yy_size_t’ {aka ‘unsigned int’} may change the sign of the result 
> > [-Wsign-conversion]
> > ../../filters/awk-filt.l:299:20: warning: conversion to ‘int’ from 
> > ‘yy_size_t’ {aka ‘unsigned int’} may change the sign of the result 
> > [-Wsign-conversion]

Actually, I don't see _these_ warnings in my build (if I had, the
differences would be a lot more).

I did my builds with my Debian/testing machine.
I'll revisit this in a week or so, to
see why the warnings are different :-)

-- 
Thomas E. Dickey <dic...@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: PGP signature

Reply via email to