Closed p5pRT closed 5 years ago
pod/perldeprecation.pod contains this entry for perl-5.32:
##### Use of code points over 0xFF in string bitwise operators
The string bitwise operators\, "&"\, "|"\, "^"\, and "~"\, treat their operands as strings of bytes. As such\, values above 0xFF are nonsensical. Some instances of these have been deprecated since Perl 5.24\, and were made fatal in 5.28\, but it turns out that in cases where the wide characters did not affect the end result\, no deprecation notice was raised\, and so remain legal. Now\, all occurrences either are fatal or raise a deprecation warning\, so that the remaining legal occurrences will be fatal in 5.32.
An example of this is
"" & "\x{100}"
The wide character is not used in the "&" operation because the left operand is shorter. This now warns anyway. #####
This entry was made in the following commit:
##### commit ba52ce15fe5ca68de1be69e394f41ccb48a731cc Author: Karl Williamson \khw@​cpan\.org Date: Tue Dec 19 16:03:39 2017 -0700
Deprecate above \xFF in bitwise string ops
This is already a fatal error for operations whose outcome depends on them\, but in things like
"abc" & "def\x{100}"
the wide character doesn't actually need to participate in the AND\, and so perl doesn't. As a result of the discussion in the thread beginning with http://nntp.perl.org/group/perl.perl5.porters/244884\, it was decided to deprecate these ones too. #####
Make it so.
Summary of my perl5 (revision 5 version 31 subversion 0) configuration: Commit id: 58f4626762668e1c1948832073998af84b2c85d0 Platform: osname=linux osvers=4.15.0-50-generic archname=x86_64-linux uname='linux zareason 4.15.0-50-generic #54-ubuntu smp mon may 6 18:46:08 utc 2019 x86_64 x86_64 x86_64 gnulinux ' config_args='-des -Dusedevel -Dusemymalloc=y' hint=recommended useposix=true d_sigaction=define useithreads=undef usemultiplicity=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=y default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='cc' ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' optimize='-O2' cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='' gccversion='7.4.0' gccosandvers='' intsize=4 longsize=8 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=16 longdblkind=3 ivtype='long' ivsize=8 nvtype='double' nvsize=8 Off_t='off_t' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='cc' ldflags =' -fstack-protector-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64 libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.27.so so=so useshrplib=false libperl=libperl.a gnulibc_version='2.27' Dynamic Linking: dlsrc=dl_dlopen.xs dlext=so d_dlsymun=undef ccdlflags='-Wl\,-E' cccdlflags='-fPIC' lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'
Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MYMALLOC PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF Built under linux Compiled at May 22 2019 14:58:04 %ENV: PERL2DIR="/home/jkeenan/gitwork/perl2" PERLBREW_HOME="/home/jkeenan/.perlbrew" PERLBREW_MANPATH="/home/jkeenan/perl5/perlbrew/perls/perl-5.28.0/man" PERLBREW_PATH="/home/jkeenan/perl5/perlbrew/bin:/home/jkeenan/perl5/perlbrew/perls/perl-5.28.0/bin" PERLBREW_PERL="perl-5.28.0" PERLBREW_ROOT="/home/jkeenan/perl5/perlbrew" PERLBREW_SHELLRC_VERSION="0.84" PERLBREW_VERSION="0.84" PERL_WORKDIR="/home/jkeenan/gitwork/perl" @INC: lib /usr/local/lib/perl5/site_perl/5.31.0/x86_64-linux /usr/local/lib/perl5/site_perl/5.31.0 /usr/local/lib/perl5/5.31.0/x86_64-linux /usr/local/lib/perl5/5.31.0
On Sat\, 25 May 2019 02:13:08 GMT\, jkeenan@pobox.com wrote:
pod/perldeprecation.pod contains this entry for perl-5.32:
##### Use of code points over 0xFF in string bitwise operators
The string bitwise operators\, "&"\, "|"\, "^"\, and "~"\, treat their operands as strings of bytes. As such\, values above 0xFF are nonsensical. Some instances of these have been deprecated since Perl 5.24\, and were made fatal in 5.28\, but it turns out that in cases where the wide characters did not affect the end result\, no deprecation notice was raised\, and so remain legal. Now\, all occurrences either are fatal or raise a deprecation warning\, so that the remaining legal occurrences will be fatal in 5.32.
An example of this is
"" & "\x{100}"
The wide character is not used in the "&" operation because the left operand is shorter. This now warns anyway. #####
This entry was made in the following commit:
##### commit ba52ce15fe5ca68de1be69e394f41ccb48a731cc Author: Karl Williamson \khw@​cpan\.org Date: Tue Dec 19 16:03:39 2017 -0700
Deprecate above \xFF in bitwise string ops
This is already a fatal error for operations whose outcome depends on them\, but in things like
"abc" & "def\x{100}"
the wide character doesn't actually need to participate in the AND\, and so perl doesn't. As a result of the discussion in the thread beginning with http://nntp.perl.org/group/perl.perl5.porters/244884\, it was decided to deprecate these ones too. #####
Make it so.
Please review patch attached. Available for smoking in this branch:
smoke-me/jkeenan/rt-134140-bitwise
Thank you very much.
-- James E Keenan (jkeenan@cpan.org)
The RT System itself - Status changed from 'new' to 'open'
Thanks\, applied as c8b94fe0369af7071d2cfe1221aeb0b9f6c4d284 -- Karl Williamson
@khwilliamson - Status changed from 'open' to 'pending release'
Migrated from rt.perl.org#134140 (status was 'pending release')
Searchable as RT134140$