Bug 239058 - lex: input() returns EOF instead of 0 on end-of-file
Summary: lex: input() returns EOF instead of 0 on end-of-file
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-09 10:21 UTC by Robert Clausecker
Modified: 2019-07-14 01:13 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker 2019-07-09 10:21:31 UTC
The flex version shipped with FreeBSD as /usr/bin/lex generates an input() function that returns EOF on EOF.  This is contrary to POSIX which mandates that 0 be returned on EOF.
Comment 1 Robert Clausecker 2019-07-09 11:26:46 UTC
This issue was fixed upstream in flex 2.6.1.  Perhaps it's a good idea to update the flex version bundled with FreeBSD.