Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Aug 2016 22:20:25 +0000
From:      bugzilla-noreply@freebsd.org
To:        perl@FreeBSD.org
Subject:   [Bug 210837] lang/perl5.22 (and related?): ext/re/re_exec.c has long long format matched up with long argument
Message-ID:  <bug-210837-14331-mfkgaYrnBX@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-210837-14331@https.bugs.freebsd.org/bugzilla/>
References:  <bug-210837-14331@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D210837

--- Comment #12 from Mark Millard <markmi@dsl-only.net> ---
(In reply to Mark Millard from comment #11)

[Note: Escape sequences hand edited out. Watch for editing errors in the
deletions.]

amd64 11.0-BETA3 without the patch got:

# grep -h arning: ~/ports_typescripts/perl5_22_initial_build.typescript
op.c:3397:26: warning: nonnull parameter 'stash' will evaluate to 'true' on
first encounter [-Wpointer-bool-conversion]
op.c:3445:15: warning: nonnull parameter 'stash' will evaluate to 'true' on
first encounter [-Wpointer-bool-conversion]
op.c:9084:8: warning: nonnull parameter 'name' will evaluate to 'true' on f=
irst
encounter [-Wpointer-bool-conversion]
op.c:3397:26: warning: nonnull parameter 'stash' will evaluate to 'true' on
first encounter [-Wpointer-bool-conversion]
op.c:3445:15: warning: nonnull parameter 'stash' will evaluate to 'true' on
first encounter [-Wpointer-bool-conversion]
op.c:9084:8: warning: nonnull parameter 'name' will evaluate to 'true' on f=
irst
encounter [-Wpointer-bool-conversion]
inflate.c:1507:61: warning: shifting a negative signed value is undefined
[-Wshift-negative-value]
ListUtil.xs:688:17: warning: unused variable 'a' [-Wunused-variable]
ListUtil.xs:689:17: warning: unused variable 'b' [-Wunused-variable]
ListUtil.xs:730:17: warning: unused variable 'a' [-Wunused-variable]
ListUtil.xs:731:17: warning: unused variable 'b' [-Wunused-variable]
Opcode.xs:230:5: warning: unused variable 'my_cxtp' [-Wunused-variable]
./sdbm.h:54:20: warning: 'extern' variable has an initializer
[-Wextern-initializer]
Piece.xs:688:18: warning: comparison of integers of different signs: 'int' =
and
'unsigned long' [-Wsign-compare]
Piece.xs:782:18: warning: comparison of integers of different signs: 'int' =
and
'unsigned long' [-Wsign-compare]
Piece.xs:1059:29: warning: comparison of integers of different signs: 'int'=
 and
'unsigned long' [-Wsign-compare]
Piece.xs:350:13: warning: unused variable 'copyright' [-Wunused-variable]
Piece.xs:352:13: warning: unused variable 'sccsid' [-Wunused-variable]
<command line>:11:9: warning: 'TIME_HIRES_STAT' macro redefined
[-Wmacro-redefined]


With the patch amd64 got those too, including the int vs. unsigned long not=
ices
that mean 32-bit vs. 64-bit in addition to signed vs. unsigned.

# grep arning: ~/ports_typescripts/perl5_22_patched_build.typescript | more
op.c:3397:26: warning: nonnull parameter 'stash' will evaluate to 'true' on
first encounter [-Wpointer-bool-conversion]
op.c:3445:15: warning: nonnull parameter 'stash' will evaluate to 'true' on
first encounter [-Wpointer-bool-conversion]
op.c:9084:8: warning: nonnull parameter 'name' will evaluate to 'true' on f=
irst
encounter [-Wpointer-bool-conversion]
op.c:3397:26: warning: nonnull parameter 'stash' will evaluate to 'true' on
first encounter [-Wpointer-bool-conversion]
op.c:3445:15: warning: nonnull parameter 'stash' will evaluate to 'true' on
first encounter [-Wpointer-bool-conversion]
op.c:9084:8: warning: nonnull parameter 'name' will evaluate to 'true' on f=
irst
encounter [-Wpointer-bool-conversion]
inflate.c:1507:61: warning: shifting a negative signed value is undefined
[-Wshift-negative-value]
ListUtil.xs:688:17: warning: unused variable 'a' [-Wunused-variable]
ListUtil.xs:689:17: warning: unused variable 'b' [-Wunused-variable]
ListUtil.xs:730:17: warning: unused variable 'a' [-Wunused-variable]
ListUtil.xs:731:17: warning: unused variable 'b' [-Wunused-variable]
Opcode.xs:230:5: warning: unused variable 'my_cxtp' [-Wunused-variable]
./sdbm.h:54:20: warning: 'extern' variable has an initializer
[-Wextern-initializer]
<command line>:11:9: warning: 'TIME_HIRES_STAT' macro redefined
[-Wmacro-redefined]
Piece.xs:688:18: warning: comparison of integers of different signs: 'int' =
and
'unsigned long' [-Wsign-compare]
Piece.xs:782:18: warning: comparison of integers of different signs: 'int' =
and
'unsigned long' [-Wsign-compare]
Piece.xs:1059:29: warning: comparison of integers of different signs: 'int'=
 and
'unsigned long' [-Wsign-compare]
Piece.xs:350:13: warning: unused variable 'copyright' [-Wunused-variable]
Piece.xs:352:13: warning: unused variable 'sccsid' [-Wunused-variable]

So for amd64 with and without the patch does not change the warnings. This =
is
likely a expected/hoped-for result.

The nonnull parameter will evaluate to true warnings are:

--- op.o ---
op.c:3397:26: warning: nonnull parameter 'stash' will evaluate to 'true' on
first encounter [-Wpointer-bool-conversion]
    SV * const stashsv =3D stash ? newSVhek(HvNAME_HEK(stash)) : &PL_sv_no;
                         ^~~~~ ~
op.c:3445:15: warning: nonnull parameter 'stash' will evaluate to 'true' on
first encounter [-Wpointer-bool-conversion]
    stashsv =3D stash ? newSVhek(HvNAME_HEK(stash)) : &PL_sv_no;
              ^~~~~ ~
op.c:9084:8: warning: nonnull parameter 'name' will evaluate to 'true' on f=
irst
encounter [-Wpointer-bool-conversion]
        name, name ? strlen(name) : 0, subaddr, NULL, NULL, NULL, 0
              ^~~~ ~
./embed.h:1274:69: note: expanded from macro 'newXS_len_flags'
#define newXS_len_flags(a,b,c,d,e,f,g)  Perl_newXS_len_flags(aTHX_
a,b,c,d,e,f,g)
                                                                     ^


The inflate.c shifting of a negative signed value being undefined is from:

--- inflate.o ---
cc -c  -I./zlib-src  -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-alia=
sing
-pipe -fstack-protector-strong -I/usr/local/include -Wall
-Werror=3Ddeclaration-after-statement -Wextra -Wc++-compat -Wwrite-strings =
-pipe
-g -fstack-protector -fno-strict-aliasing    -DVERSION=3D\"2.068\"=20
-DXS_VERSION=3D\"2.068\" -DPIC -fPIC "-I../.."  -DNO_VIZ -DZ_SOLO=20=20
-DGZIP_OS_CODE=3D3 inflate.c
--- lib/auto/DB_File/DB_File.so ---
LD_LIBRARY_PATH=3D/usr/obj/portswork/usr/ports/lang/perl5.22/work/perl\-5.2=
2.2
./miniperl -Ilib make_ext.pl lib/auto/DB_File/DB_File.so  MAKE=3D"/usr/bin/=
make"
LIBPERL_A=3Dlibperl.so.5.22.2 LINKTYPE=3Ddynamic
--- lib/auto/Compress/Raw/Zlib/Zlib.so ---
inflate.c:1507:61: warning: shifting a negative signed value is undefined
[-Wshift-negative-value]
    if (strm =3D=3D Z_NULL || strm->state =3D=3D Z_NULL) return -1L << 16;
                                                        ~~~ ^

The extern variable with an initializer is for:

--- sdbm.o ---
cc -c  -I../..  -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing
-pipe -fstack-protector-strong -I/usr/local/include -Wall
-Werror=3Ddeclaration-after-statement -Wextra -Wc++-compat -Wwrite-strings =
-pipe
-g -fstack-protector -fno-strict-aliasing    -DVERSION=3D\"1.13
\"  -DXS_VERSION=3D\"1.13\" -DPIC -fPIC "-I../.."  -DSDBM -DDUFF sdbm.c
In file included from sdbm.c:15:
./sdbm.h:54:20: warning: 'extern' variable has an initializer
[-Wextern-initializer]
extern const datum nullitem
                   ^


The TIME_HIRES_STAT notices are:

--- HiRes.o ---
cc -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include -Wall
-Werror=3Ddeclaration-after-statement -Wextra -Wc++-compat -Wwrite-strings =
-pipe
-g -fstack-protector -fno-strict-aliasing    -DVERSION=3D\"1.9726\"=20
-DXS_VERSION=3D\"1.9726\" -DPIC -fPIC "-I../.."  -DTIME_HIRES_NANOSLEEP
-DTIME_HIRES_CLOCK_GETTIME -DTIME_HIRES_CLOCK_GETRES -DTIME_HIRES_CLOCK
-DTIME_HIRES_STAT=3D1 -DTIME_HIRES_STAT=3D4 -DATLEASTFIVEOHOHFIVE HiRes.c
In file included from <built-in>:319:
<command line>:11:9: warning: 'TIME_HIRES_STAT' macro redefined
[-Wmacro-redefined]
#define TIME_HIRES_STAT 4
        ^
<command line>:10:9: note: previous definition is here
#define TIME_HIRES_STAT 1
        ^

which are from the command-line -D's.



The (signed) int vs. unsigned long warnings are for:

--- lib/auto/Time/Piece/Piece.so ---
Piece.xs:688:18: warning: comparison of integers of different signs: 'int' =
and
'unsigned long' [-Wsign-compare]
                        for (i =3D 0; i < asizeof(Locale->weekday); i++) {
                                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
Piece.xs:782:18: warning: comparison of integers of different signs: 'int' =
and
'unsigned long' [-Wsign-compare]
                        for (i =3D 0; i < asizeof(Locale->month); i++) {
                                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~
Piece.xs:1059:29: warning: comparison of integers of different signs: 'int'=
 and
'unsigned long' [-Wsign-compare]
. . .
--- lib/auto/Time/Piece/Piece.so ---
        if ((len > 0 && len < sizeof(tmpbuf)) || (len =3D=3D 0 && *fmt =3D=
=3D '\0'))
                        ~~~ ^ ~~~~~~~~~~~~~~

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-210837-14331-mfkgaYrnBX>