Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jkeenan opened this issue Jul 2, 2022 · 3 comments
Closed

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

jkeenan opened this issue Jul 2, 2022 · 3 comments
Labels
build-time-warnings Replaces [META] Build-time warnings RT #133556

Comments

@jkeenan
Copy link
Contributor

jkeenan commented Jul 2, 2022

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 <khw@cpan.org>
AuthorDate: Fri Nov 13 09:38:21 2020 -0700
Commit:     Karl Williamson <khw@cpan.org>
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.

@jkeenan jkeenan added Needs Triage build-time-warnings Replaces [META] Build-time warnings RT #133556 labels Jul 2, 2022
@jkeenan
Copy link
Contributor Author

jkeenan commented Jul 2, 2022

Bisecting with this invocation:

~/bin/perl/identify-build-transitions \
        --compiler=clang \
        --gitdir="$GIT_WORKDIR/perl2" \
        --branch=blead \
        --first=c25af7d9772eae07700757f7061ca84e56c5c058 \
        --last=431ea43db26622d369b66e8ebcbf5abb1b899c0d \
        --configure_command='sh ./Configure -des -Dusedevel -Duseithreads -Dcc=clang 1>/dev/null 2>&1' \
        --probe=warning \
        --verbose

... indicates that the warnings first began to be emitted (on FreeBSD-12) at this commit:

commit 6e37db9b2eefdb70c52184da55586fe1cae6cffc
Author:     Karl Williamson <khw@cpan.org>
AuthorDate: Fri Jul 1 14:30:13 2022 -0600
Commit:     Karl Williamson <khw@cpan.org>
CommitDate: Fri Jul 1 14:32:31 2022 -0600

    regexec.c: Avoid compiler msgs

@khwilliamson, can you take a look?

@khwilliamson
Copy link
Contributor

Try smoke-me/khw-comparison branch

@jkeenan
Copy link
Contributor Author

jkeenan commented Jul 3, 2022

Try smoke-me/khw-comparison branch

That looks good; please merge. Thanks.

khwilliamson added a commit that referenced this issue Jul 3, 2022
On some configurations we're getting comparison of signed vs unsigned.

This fixes GH #19915
scottchiefbaker pushed a commit to scottchiefbaker/perl5 that referenced this issue Nov 3, 2022
On some configurations we're getting comparison of signed vs unsigned.

This fixes GH Perl#19915
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-time-warnings Replaces [META] Build-time warnings RT #133556
Projects
None yet
Development

No branches or pull requests

2 participants