Skip to content

regexec.c: recent commit triggers new build-time warning #19915

Closed
@jkeenan

Description

@jkeenan

At v5.37.1-53-g431ea43db2 (committed Fri Jul 1 21:34:26 2022 -0600) I am observing these build-time warnings when compiling perl on FreeBSD-12 using clang10 as the compiler.

regexec.c:10165:31: warning: comparison of integers of different signs: 'PERL_UINT_FAST8_T' (aka 'unsigned int') and 'PERL_INT_FAST8_T' (aka 'int') [-Wsign-compare]
                for (i = 0; i < Binfo.count; i++) {
                            ~ ^ ~~~~~~~~~~~
regexec.c:10202:27: warning: comparison of integers of different signs: 'PERL_UINT_FAST8_T' (aka 'unsigned int') and 'PERL_INT_FAST8_T' (aka 'int') [-Wsign-compare]
            for (i = 0; i < Binfo.count; i++) {
                        ~ ^ ~~~~~~~~~~~

I was not getting these build-time warnings as recently as v5.37.1-29-gc25af7d977 (committed June 27). (At that commit, I was only getting the -Wunused-function warning previously reported in #19877.)

What is puzzling is that the statements in regexec.c at which the warnings are being emitted have been in blead for several years.

bb3825626ed (Karl Williamson          2020-11-13 09:38:21 -0700 10165)                 for (i = 0; i < Binfo.count; i++) {

commit bb3825626ed2b1217a2ac184eff66d0d4ed6e070
Author:     Karl Williamson <[email protected]>
AuthorDate: Fri Nov 13 09:38:21 2020 -0700
Commit:     Karl Williamson <[email protected]>
CommitDate: Sat Dec 19 21:36:46 2020 -0700

    regexec.c: Revamp S_setup_EXACTISH_ST() loop end conditions

So some very recent commit must have triggered the emission of these warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    build-time-warningsReplaces [META] Build-time warnings RT #133556

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions