Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Cause:
`flex' generates scanner code (lex.yy.c) containing a comparison between signed and unsigned integers.
Consequence:
Compiling a flex generated scanner with 'g++' and turning on all warnings with the '-Wall' compiler option generates a warning due to the comparison.
Fix:
'flex' is fixed so as not to compare integer types with different signed-ness.
Result:
No warning corresponding to comparison of signed and unsigned integers is generated when compiling 'flex' output with 'g++ -Wall'.
Description of problem:
flex produces code with compiler warnings, resulting in failure to compile when using -Wall -Werror for C++. Specifically it generates:
error: comparison between signed and unsigned integer expressions
Version-Release number of selected component (if applicable):
2.5.37-3.el7
How reproducible:
Pretty simple.
Steps to Reproduce:
1. Any valid lex file.
2. run flex (flex file.l)
3. compile output as C++ with all warnings (g++ -c -Wall lex.yy.c)
Actual results:
lex.yy.c: In function ‘yy_buffer_state* test__scan_bytes(const char*, yy_size_t)’:
lex.yy.c:1487:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( i = 0; i < _yybytes_len; ++i )
Expected results:
No output. Object file (.o) created.
Additional info:
This has been fixed in Fedora, multiple times it looks like. See bug 411151, bug 445950, bug 993447. Can't find any sign of it making it to RHEL7 though.
We have policies and procedures for prioritizing which bugs are fixed in any given release -- to date this bug has not met the criteria set for Red Hat Enterprise Linux 7 updates.
If you are a Red Hat Enterprise Linux customer and this is an important bug for you, please reach out to your customer service representative so they can take appropriate steps to ensure this bug is prioritized appropriately.
Created attachment 1271694[details]
fix compiler "comparison between signed and unsigned integer" warning in yy_scan_bytes
This fixes the problem for me.
Regards,
Andy
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2018:3126