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

Perl headers severely warn on format strings on GCC C++11 -Wliteral-suffix #13451

Closed
p5pRT opened this issue Dec 3, 2013 · 18 comments
Closed

Comments

@p5pRT
Copy link

p5pRT commented Dec 3, 2013

Migrated from rt.perl.org#120670 (status was 'resolved')

Searchable as RT120670$

@p5pRT
Copy link
Author

p5pRT commented Dec 3, 2013

From @bulk88

Created by @bulk88

Perl's headers when compiled with GCC with -std=c++0x gives tons of
"warning​: invalid suffix on literal;" warnings. Command line used below.
______________________________________________________
g++ -c -I"/cygdrive/c/sources/rperl/t" -I/tmp/RPerl-latest/lib
-Wno-deprecated -std=c++0x -DUSEIMPORTLIB -O3 -DVERSION=\"0.00\"
-DXS_VERSION=\"0.00\"
"-I/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE" eval_566_dc87.c
______________________________________________________
In file included from
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/perl.h​:3447​:0,
  from eval_566_dc87.xs​:11​:
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/pad.h​:143​:19​: warning​:
invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wliteral-suffix]
  Perl_croak(aTHX_ "panic​: illegal pad in %s​: 0x%"UVxf"[0x%"UVxf"]",\
  ^
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/pad.h​:143​:54​: warning​:
invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wliteral-suffix]
  Perl_croak(aTHX_ "panic​: illegal pad in %s​: 0x%"UVxf"[0x%"UVxf"]",\
  ^
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/pad.h​:150​:19​: warning​:
invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wliteral-suffix]
  Perl_croak(aTHX_ "panic​: invalid pad in %s​: 0x%"UVxf"[0x%"UVxf"]",\
  ^
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/pad.h​:150​:54​: warning​:
invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wliteral-suffix]
  Perl_croak(aTHX_ "panic​: invalid pad in %s​: 0x%"UVxf"[0x%"UVxf"]",\
  ^
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/pad.h​:236​:8​: warning​:
invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wliteral-suffix]
  "Pad 0x%"UVxf"[0x%"UVxf"] set_cur depth=%d\n", \
  ^
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/pad.h​:236​:21​: warning​:
invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wliteral-suffix]
  "Pad 0x%"UVxf"[0x%"UVxf"] set_cur depth=%d\n", \
  ^
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/pad.h​:254​:8​: warning​:
invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wliteral-suffix]
  "Pad 0x%"UVxf"[0x%"UVxf"] save_local\n", \
  ^
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/pad.h​:254​:21​: warning​:
invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wliteral-suffix]
  "Pad 0x%"UVxf"[0x%"UVxf"] save_local\n", \
  ^
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/pad.h​:262​:8​: warning​:
invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wliteral-suffix]
  "Pad 0x%"UVxf"[0x%"UVxf"] restore_local\n", \
  ^
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/pad.h​:262​:21​: warning​:
invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wliteral-suffix]
  "Pad 0x%"UVxf"[0x%"UVxf"] restore_local\n", \
  ^
In file included from eval_566_dc87.xs​:11​:0​:
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/perl.h​:4284​:8​: warning​:
invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wliteral-suffix]
  INIT("Modification of non-creatable hash value attempted, subscript
\"%"SVf"\"");
  ^
_______________________________________________________
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-cygwin/4.8.2/lto-wrapper.exe
Target​: x86_64-pc-cygwin
Configured with​:
/cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.2-1/src/gcc-4.8.2/configure
--srcdir=/cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.2-1/src/gcc-4.8.2
--prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
--libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var
--sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share
--docdir=/usr/share/doc/gcc -C --build=x86_64-pc-cygwin
--host=x86_64-pc-cygwin --target=x86_64-pc-cygwin
--without-libiconv-prefix --without-libintl-prefix --enable-shared
--enable-shared-libgcc --enable-static
--enable-version-specific-runtime-libs --enable-bootstrap
--disable-__cxa_atexit --with-dwarf2 --with-tune=generic
--enable-languages=c,c++,fortran,lto,objc,obj-c++ --enable-graphite
--enable-threads=posix --enable-libatomic --enable-libgomp
--disable-libitm --enable-libquadmath --enable-libquadmath-support
--enable-libssp --enable-libgcj-sublibs --disable-java-awt
--disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld
--with-gnu-as --with-cloog-include=/usr/include/cloog-isl
--without-libiconv-prefix --without-libintl-prefix --with-system-zlib
Thread model​: posix
gcc version 4.8.2 (GCC)
_______________________________________________________

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.14.4:

Configured by Yaakov at Mon Mar 11 18:16:36 CDT 2013.

Summary of my perl5 (revision 5 version 14 subversion 4) configuration:
   
  Platform:
    osname=cygwin, osvers=1.7.18(0.26353), archname=cygwin-thread-multi
    uname='cygwin_nt-6.1 yaakov04 1.7.18(0.26353) 2013-03-07 19:25 
x86_64 cygwin '
    config_args='-d -e -Dprefix=/usr -Dmksymlinks -Dusethreads 
-Darchname=x86_64-cygwin-threads -Dlibperl=cygperl5_14.dll -Dcc=gcc 
-Dld=g++'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ 
-fno-strict-aliasing -pipe -fstack-protector',
    optimize='-O3',
    cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ 
-fno-strict-aliasing -pipe -fstack-protector'
    ccversion='', gccversion='4.8.0 20130307 (experimental)', 
gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++', ldflags =' -Wl,--enable-auto-import 
-Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector'
    libpth=/usr/lib /lib
    libs=-lgdbm -ldb -ldl -lcrypt -lgdbm_compat
    perllibs=-ldl -lcrypt
    libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=cygperl5_14.dll
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' --shared  -Wl,--enable-auto-import 
-Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector'

Locally applied patches:
    Bug#55162 File::Spec::case_tolerant performance
    CYG07 $vendorarch/auto/.rebase
    CYG15 static Win32CORE
    CYG17 cyg-1.7 paths-utf8
    0c612ce82 Fix building static extensions on cygwin, -UUSEIMPORTLIB
    1bac5ecc1 Fix 64-bit threading sv.c: S_anonymise_cv_maybe
    Cygwin::sync_winenv added


@INC for perl 5.14.4:
    /usr/lib/perl5/site_perl/5.14/x86_64-cygwin-threads
    /usr/lib/perl5/site_perl/5.14
    /usr/lib/perl5/vendor_perl/5.14/x86_64-cygwin-threads
    /usr/lib/perl5/vendor_perl/5.14
    /usr/lib/perl5/5.14/x86_64-cygwin-threads
    /usr/lib/perl5/5.14
    .


Environment for perl 5.14.4:
    CYGWIN=tty
    HOME=/home/Administrator
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/usr/lib/x86:/usr/X11R6/lib
    LOGDIR (unset)
    PATH=/usr/local/bin:/usr/bin:/cygdrive/c/Program Files (x86)*removed*
    PERL_BADLANG (unset)
    SHELL=/bin/bash


@p5pRT
Copy link
Author

p5pRT commented Dec 4, 2013

From @jkeenan

On Tue Dec 03 04​:56​:58 2013, bulk88 wrote​:

This is a bug report for perl from bulk88@​hotmail.com,
generated with the help of perlbug 1.39 running under perl 5.14.4.

-----------------------------------------------------------------
[Please describe your issue here]
Perl's headers when compiled with GCC with -std=c++0x gives tons of
"warning​: invalid suffix on literal;" warnings. Command line used below.
______________________________________________________
g++ -c -I"/cygdrive/c/sources/rperl/t" -I/tmp/RPerl-latest/lib
-Wno-deprecated -std=c++0x -DUSEIMPORTLIB -O3 -DVERSION=\"0.00\"
-DXS_VERSION=\"0.00\"
"-I/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE" eval_566_dc87.c
______________________________________________________
In file included from
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/perl.h​:3447​:0,
from eval_566_dc87.xs​:11​:
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/pad.h​:143​:19​: warning​:
invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wliteral-suffix]
Perl_croak(aTHX_ "panic​: illegal pad in %s​: 0x%"UVxf"[0x%"UVxf"]",\
^
/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/pad.h​:143​:54​: warning​:
invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wliteral-suffix]
Perl_croak(aTHX_ "panic​: illegal pad in %s​: 0x%"UVxf"[0x%"UVxf"]",\
^

[snip many more warnings]

bulk88,

There are many variables which could be leading to this result​:

* the OS -- cygwin is not one of our most often tested systems;

* the GCC version -- this is quite new, correct?

* your configuration arguments

I don't have cygwin or that recent a GCC available. On dromedary (Linux x86_64), we have​: #####
$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
#####

I configured blead as follows​:

#####
sh ./Configure -des -Dusedevel -Dusethreads -Dcc=gcc -Dld=g++
#####

That's about as close as I could come to your configuration.

I got no 'invalid suffix' warnings.

Could you try this with, say, other versions of GCC to see if the compiler version is the explanatory variable?

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Dec 4, 2013

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Dec 4, 2013

From @craigberry

On Tue, Dec 3, 2013 at 9​:29 PM, James E Keenan via RT
<perlbug-followup@​perl.org> wrote​:

Could you try this with, say, other versions of GCC to see if the compiler version is the explanatory variable?

It's readily reproducible configuring with

$ ./Configure -Dusedevel -Dcc=g++ -Accflags=-std=c++0x -des

on

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin13.0.0/4.8.2/lto-wrapper
Target​: x86_64-apple-darwin13.0.0
Configured with​: ./configure
Thread model​: posix
gcc version 4.8.2 (GCC)

I don't understand why it thinks format specifiers are identifiers but
I haven't researched it at all.

@p5pRT
Copy link
Author

p5pRT commented Dec 4, 2013

From @tonycoz

On Tue Dec 03 04​:56​:58 2013, bulk88 wrote​:

This is a bug report for perl from bulk88@​hotmail.com,
generated with the help of perlbug 1.39 running under perl 5.14.4.

-----------------------------------------------------------------
[Please describe your issue here]
Perl's headers when compiled with GCC with -std=c++0x gives tons of
"warning​: invalid suffix on literal;" warnings. Command line used below.

I can reproduce this on blead (5.14 isn't supported.)

I guess this means we'll need to start putting spaces around UVxf and friends.

I don't understand why it thinks format specifiers are identifiers but I haven't
researched it at all.

They're used for user-defined literals[1] in C++, which only allows name starting with underscores.

http​://en.wikipedia.org/wiki/C++11#User-defined_literals

So you can define​:

// I have no idea if this is the correct syntax
Date operator "" _date(const char *s, size_t l) {
  ...
}

then initialize objects with those literals instead of hoping the right constructor
is called​:

Date foo = "2013-12-04"_date;

Tony

[1] which I don't claim to understand at this point

@p5pRT
Copy link
Author

p5pRT commented Dec 4, 2013

From perl5-porters@perl.org

Tony Cook wrote​:

I don't understand why it thinks format specifiers are identifiers but I haven't
researched it at all.

They're used for user-defined literals[1] in C++, which only allows name
starting with underscores.

I think it would be worth simply suppressing that warning.

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2013

From @tonycoz

On Wed Dec 04 04​:08​:55 2013, perl5-porters@​perl.org wrote​:

Tony Cook wrote​:

I don't understand why it thinks format specifiers are identifiers
but I haven't
researched it at all.

They're used for user-defined literals[1] in C++, which only allows
name
starting with underscores.

I think it would be worth simply suppressing that warning.

If the C++ standard disallows "foo"BAR and we want our headers to be usable from C++, then we need to fix the headers.

Compilers are only required to produce a diagnostic for non-conforming code, which is what g++ is doing in this case, but another compiler can correctly reject the code entirely with an error and prevent compilation of the unit entirely.

I don't think we need to worry about the same warning in a .c file.

I'll produce a fix for the headers.

Tony

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2013

From @bulk88

On Tue Dec 03 20​:36​:35 2013, tonyc wrote​:

On Tue Dec 03 04​:56​:58 2013, bulk88 wrote​:

This is a bug report for perl from bulk88@​hotmail.com,
generated with the help of perlbug 1.39 running under perl 5.14.4.

-----------------------------------------------------------------
[Please describe your issue here]
Perl's headers when compiled with GCC with -std=c++0x gives tons of
"warning​: invalid suffix on literal;" warnings. Command line used
below.

I can reproduce this on blead (5.14 isn't supported.)

I guess this means we'll need to start putting spaces around UVxf and
friends.

I don't understand why it thinks format specifiers are identifiers
but I haven't
researched it at all.

They're used for user-defined literals[1] in C++, which only allows
name starting with underscores.

http​://en.wikipedia.org/wiki/C++11#User-defined_literals

So you can define​:

// I have no idea if this is the correct syntax
Date operator "" _date(const char *s, size_t l) {
...
}

then initialize objects with those literals instead of hoping the
right constructor
is called​:

Date foo = "2013-12-04"_date;

Tony

[1] which I don't claim to understand at this point

From what I understand is the C++11 feature is, in C you can suffix literals with l/L/f/F/u/U/i64 to change their type, but those are all hard coded into C compiler. Now you can define/hook your own suffixes for literals not just l/L/f/F/u/U/i64. Operator overloading was extended to the suffixes for literals. If they add prefix overloading and a couple other things, soon C++ will have the ability to compile Perl code after you "#include <perlpp>" jkjk

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2013

From @bulk88

On Mon Dec 09 21​:24​:41 2013, tonyc wrote​:

I don't think we need to worry about the same warning in a .c file.

I'll produce a fix for the headers.

Tony

The header warnings are a real bug if someone writes C++11 xsubs or links to a C++11 C++ lib.

But a 2nd problem of much less priority is some p5pers compile the interp's .c files in C++ mode (year unspecified, probably C++03 or older), and the interp usually builds successfully in C++ mode (atleast on Win32 for me with Visual C >6). I'm not sure if the CORE XS modules compile with g++ on *nix or not. So are the .c files C++11 compatible or not? This ticket isn't about whether the core .c files are C++ okay (so when the headers are made warning free on G++ 11 it can be closed), but this post is just a reminder about the practice.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2013

From @Leont

On Tue, Dec 10, 2013 at 6​:55 AM, bulk88 via RT <perlbug-followup@​perl.org>wrote​:

From what I understand is the C++11 feature is, in C you can suffix
literals with l/L/f/F/u/U/i64 to change their type, but those are all hard
coded into C compiler. Now you can define/hook your own suffixes for
literals not just l/L/f/F/u/U/i64. Operator overloading was extended to the
suffixes for literals. If they add prefix overloading and a couple other
things, soon C++ will have the ability to compile Perl code after you
"#include <perlpp>" jkjk

Actually, given I've previously written libperl++, that «auto foo =
"Foo->get_stuff()"_perl» shouldn't be all that hard to implement ;-)

Leon

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2013

From @tonycoz

On Mon Dec 09 21​:24​:41 2013, tonyc wrote​:

I'll produce a fix for the headers.

The attached fixes all the core headers.

ppport.h is producing literal suffix warnings too, but I'm not sure whether
Devel-PPPort is currently considered blead upstream or not.

Tony

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2013

From @tonycoz

0001-perl-120670-make-perl-headers-C-11-compatible.patch
From 7f719bd6cfc1d99e0b5ada8f878ad1dfe09bd9c9 Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@saturn.(none)>
Date: Wed, 11 Dec 2013 09:48:15 +1100
Subject: [PATCH] [perl #120670] make perl headers C++11 compatible

---
 inline.h |    2 +-
 pad.h    |   10 +++++-----
 perl.h   |    6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/inline.h b/inline.h
index 226970b..518d8da 100644
--- a/inline.h
+++ b/inline.h
@@ -244,7 +244,7 @@ S_bootstrap_ctype(U8 character, UV classnum, bool full_Latin1)
 
         default: break;
     }
-    Perl_croak(aTHX_ "panic: bootstrap_ctype() has an unexpected character class '%"UVxf"'", classnum);
+    Perl_croak(aTHX_ "panic: bootstrap_ctype() has an unexpected character class '%" UVxf "'", classnum);
 }
 #endif
 
diff --git a/pad.h b/pad.h
index 32bdb61..564e783 100644
--- a/pad.h
+++ b/pad.h
@@ -143,14 +143,14 @@ typedef enum {
 #  define ASSERT_CURPAD_LEGAL(label) \
     pad_peg(label); \
     if (PL_comppad ? (AvARRAY(PL_comppad) != PL_curpad) : (PL_curpad != 0))  \
-	Perl_croak(aTHX_ "panic: illegal pad in %s: 0x%"UVxf"[0x%"UVxf"]",\
+	Perl_croak(aTHX_ "panic: illegal pad in %s: 0x%" UVxf "[0x%" UVxf "]",\
 	    label, PTR2UV(PL_comppad), PTR2UV(PL_curpad));
 
 
 #  define ASSERT_CURPAD_ACTIVE(label) \
     pad_peg(label); \
     if (!PL_comppad || (AvARRAY(PL_comppad) != PL_curpad))		  \
-	Perl_croak(aTHX_ "panic: invalid pad in %s: 0x%"UVxf"[0x%"UVxf"]",\
+	Perl_croak(aTHX_ "panic: invalid pad in %s: 0x%" UVxf "[0x%" UVxf "]",\
 	    label, PTR2UV(PL_comppad), PTR2UV(PL_curpad));
 #else
 #  define ASSERT_CURPAD_LEGAL(label)
@@ -324,7 +324,7 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL()
 	PL_comppad = (PAD*) (PadlistARRAY(padlist)[nth]);	\
 	PL_curpad = AvARRAY(PL_comppad);			\
 	DEBUG_Xv(PerlIO_printf(Perl_debug_log,			\
-	      "Pad 0x%"UVxf"[0x%"UVxf"] set_cur    depth=%d\n",	\
+	      "Pad 0x%" UVxf "[0x%" UVxf "] set_cur    depth=%d\n",	\
 	      PTR2UV(PL_comppad), PTR2UV(PL_curpad), (int)(nth)));
 
 
@@ -342,7 +342,7 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL()
 	PL_comppad = (npad);					\
 	PL_curpad =  PL_comppad ? AvARRAY(PL_comppad) : NULL;	\
 	DEBUG_Xv(PerlIO_printf(Perl_debug_log,			\
-	      "Pad 0x%"UVxf"[0x%"UVxf"] save_local\n",		\
+	      "Pad 0x%" UVxf "[0x%" UVxf "] save_local\n",		\
 	      PTR2UV(PL_comppad), PTR2UV(PL_curpad)));
 
 #define PAD_RESTORE_LOCAL(opad) \
@@ -350,7 +350,7 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL()
 	PL_comppad = opad;						\
 	PL_curpad =  PL_comppad ? AvARRAY(PL_comppad) : NULL;	\
 	DEBUG_Xv(PerlIO_printf(Perl_debug_log,			\
-	      "Pad 0x%"UVxf"[0x%"UVxf"] restore_local\n",	\
+	      "Pad 0x%" UVxf "[0x%" UVxf "] restore_local\n",	\
 	      PTR2UV(PL_comppad), PTR2UV(PL_curpad)));
 
 
diff --git a/perl.h b/perl.h
index 2d98004..b7c5b8b 100644
--- a/perl.h
+++ b/perl.h
@@ -3033,7 +3033,7 @@ typedef pthread_key_t	perl_key;
 
 /* Takes three arguments: is_utf8, length, str */
 #ifndef UTF8f
-#  define UTF8f "d%"UVuf"%4p"
+#  define UTF8f "d%" UVuf "%4p"
 #endif
 #define UTF8fARG(u,l,p) (int)cBOOL(u), (UV)(l), (void*)(p)
 
@@ -4122,7 +4122,7 @@ START_EXTERN_C
 EXTCONST char PL_warn_uninit[]
   INIT("Use of uninitialized value%s%s%s");
 EXTCONST char PL_warn_uninit_sv[]
-  INIT("Use of uninitialized value%"SVf"%s%s");
+  INIT("Use of uninitialized value%" SVf "%s%s");
 EXTCONST char PL_warn_nosemi[]
   INIT("Semicolon seems to be missing");
 EXTCONST char PL_warn_reserved[]
@@ -4142,7 +4142,7 @@ EXTCONST char PL_no_usym[]
 EXTCONST char PL_no_aelem[]
   INIT("Modification of non-creatable array value attempted, subscript %d");
 EXTCONST char PL_no_helem_sv[]
-  INIT("Modification of non-creatable hash value attempted, subscript \"%"SVf"\"");
+  INIT("Modification of non-creatable hash value attempted, subscript \"%" SVf "\"");
 EXTCONST char PL_no_modify[]
   INIT("Modification of a read-only value attempted");
 EXTCONST char PL_no_mem[sizeof("Out of memory!\n")]
-- 
1.7.9

@p5pRT
Copy link
Author

p5pRT commented Dec 14, 2013

From @bulk88

On Tue Dec 10 14​:52​:50 2013, tonyc wrote​:

The attached fixes all the core headers.

I'm not in a position to test this patch. I'll assume all of literal suffix format string warning in the headers was fixed, and not just the line numbers in my sample from a 5.14 perl trying to compile an XS library. So don't wait for confirmation from me that this patch fixes the warnings.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Jan 16, 2014

From @tonycoz

On Tue Dec 10 14​:52​:50 2013, tonyc wrote​:

On Mon Dec 09 21​:24​:41 2013, tonyc wrote​:

I'll produce a fix for the headers.

The attached fixes all the core headers.

ppport.h is producing literal suffix warnings too, but I'm not sure whether
Devel-PPPort is currently considered blead upstream or not.

Applied to blead, I'll make patch for Devel-PPPort.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jan 16, 2014

From @tonycoz

On Wed Jan 15 18​:17​:28 2014, tonyc wrote​:

On Tue Dec 10 14​:52​:50 2013, tonyc wrote​:

On Mon Dec 09 21​:24​:41 2013, tonyc wrote​:

I'll produce a fix for the headers.

The attached fixes all the core headers.

ppport.h is producing literal suffix warnings too, but I'm not sure
whether
Devel-PPPort is currently considered blead upstream or not.

Applied to blead, I'll make patch for Devel-PPPort.

Tony

Sent upstream as https://rt.cpan.org/Ticket/Display.html?id=92188.

Tony

@p5pRT
Copy link
Author

p5pRT commented Mar 8, 2014

From @bulk88

On Wed Jan 15 19​:15​:56 2014, tonyc wrote​:

On Wed Jan 15 18​:17​:28 2014, tonyc wrote​:

On Tue Dec 10 14​:52​:50 2013, tonyc wrote​:

On Mon Dec 09 21​:24​:41 2013, tonyc wrote​:

I'll produce a fix for the headers.

The attached fixes all the core headers.

ppport.h is producing literal suffix warnings too, but I'm not sure
whether
Devel-PPPort is currently considered blead upstream or not.

Applied to blead, I'll make patch for Devel-PPPort.

Tony

Sent upstream as https://rt.cpan.org/Ticket/Display.html?id=92188.

Tony

Dual-Life/Devel-PPPort#1 it was merged

but doesn't look like it has gotten a new CPAN release

https://github.com/mhx/Devel-PPPort/commits/master

so there is nothing to sync back to blead yet, do we want a new PPPort to ship with 5.20?

I think needs a perldelta entry too.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Mar 26, 2014

From @tonycoz

On Fri Mar 07 16​:02​:11 2014, bulk88 wrote​:

Dual-Life/Devel-PPPort#1 it was merged

but doesn't look like it has gotten a new CPAN release

https://github.com/mhx/Devel-PPPort/commits/master

so there is nothing to sync back to blead yet, do we want a new PPPort
to ship with 5.20?

I think needs a perldelta entry too.

The merge of Devel-PPPort 3.22 solves the last remaining part of this issue.

I don't think it needs a perldelta entry.

Tony

@p5pRT p5pRT closed this as completed Mar 26, 2014
@p5pRT
Copy link
Author

p5pRT commented Mar 26, 2014

@tonycoz - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant