Bug 445950 - signed/unsigned comparison in the generated code.
signed/unsigned comparison in the generated code.
Product: Fedora
Classification: Fedora
Component: flex (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Petr Machata
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-05-10 04:39 EDT by Pawel Salek
Modified: 2015-05-04 21:33 EDT (History)
1 user (show)

See Also:
Fixed In Version: 2.5.35-2.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-13 10:32:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed patch. (498 bytes, patch)
2008-05-10 04:39 EDT, Pawel Salek
no flags Details | Diff

  None (edit)
Description Pawel Salek 2008-05-10 04:39:15 EDT
Description of problem:
flex generates code that compares signed and unsigned numbers. While this is
unlikely to cause problems in practice, it's nice habit to declare the variable
types properly.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Use following code:
%option noyywrap

white		[ \t]+

{white} 	{ /* We ignore white characters. */ }

2. Compile using flex flex_test.l && cc -Wsign-compare lex.yy.c

Actual results:
lex.yy.c: In function ‘yy_get_next_buffer’:
lex.yy.c:956: warning: comparison between signed and unsigned

Expected results:
Warningless compilation.

Additional info:
I have contacted flex maintainer (srivasta at debian) on 2008-04-30 but received
no response so far.
Comment 1 Pawel Salek 2008-05-10 04:39:15 EDT
Created attachment 305010 [details]
Proposed patch.
Comment 2 Fedora Update System 2008-05-12 10:02:20 EDT
flex-2.5.35-2.fc9 has been submitted as an update for Fedora 9
Comment 3 Fedora Update System 2008-05-13 10:32:23 EDT
flex-2.5.35-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.