On Tue, 31 Oct 2023 14:27:47 +0900 Osamu Aoki <[email protected]> wrote: > Package: flex > Version: 2.6.4-8.2 > Severity: minor > Tags: patch > > The flex binary package comes with examples under /usr/share/doc/flex/examples/fastw . > > These were from 2016 and don't work as expected with current gcc and > flex. > > Attached patch fix these issues. > * need "int" for main > * need tailing "%%" > > I think these may have been OK with old tool chain but they cause > trouble these days. > > Now these can be compiled with > > ``` > gcc -lfl mywc.c -o mywc > for f in 1 2 3 4 5; do > flex wc$f.l > gcc -lfl lex.yy.c -o wc$f > rm -f lex.yy.c > done > ``` > > These example files are from upstream source under > https://salsa.debian.org/srivasta/flex/-/tree/master/examples/fastwc/ > > -- System Information: > Debian Release: 12.2 > APT prefers stable-updates > APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') > Architecture: amd64 (x86_64) > > Kernel: Linux 6.4.0-0.deb12.2-amd64 (SMP w/12 CPU threads; PREEMPT) > Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en > Shell: /bin/sh linked to /usr/bin/dash > Init: systemd (via /run/systemd/system) > LSM: AppArmor: enabled > > Versions of packages flex depends on: > ii debconf [debconf-2.0] 1.5.82 > ii libc6 2.36-9+deb12u3 > ii m4 1.4.19-3 > > Versions of packages flex recommends: > ii gcc [c-compiler] 4:12.2.0-3 > ii gcc-12 [c-compiler] 12.2.0-14 > ii libfl-dev 2.6.4-8.2 > > Versions of packages flex suggests: > ii bison 2:3.8.2+dfsg-1+b1 > ii build-essential 12.9 > ii flex-doc 2.6.4-8.2 > > -- no debconf information

