This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
9 years ago[perl #116925] discuss modifying an SV's buffer
Tony Cook [Mon, 23 Jun 2014 23:55:39 +0000 (09:55 +1000)]
[perl #116925] discuss modifying an SV's buffer

9 years agoRMG - Per review - keep make distclean as a test, add comment
Matthew Horsfall [Mon, 23 Jun 2014 15:39:26 +0000 (11:39 -0400)]
RMG - Per review - keep make distclean as a test, add comment

9 years agoRMG - Per review - only -Dusedevel for development builds
Matthew Horsfall [Mon, 23 Jun 2014 15:37:34 +0000 (11:37 -0400)]
RMG - Per review - only -Dusedevel for development builds

9 years agoRMG - Clarify that updating %released/CAVEATS isn't for RCs
Matthew Horsfall [Mon, 23 Jun 2014 14:59:03 +0000 (10:59 -0400)]
RMG - Clarify that updating %released/CAVEATS isn't for RCs

9 years agoNo need for else after exit...
Matthew Horsfall [Mon, 23 Jun 2014 13:23:02 +0000 (09:23 -0400)]
No need for else after exit...

9 years agoDon't add a perldelta entry for _charnames.
Matthew Horsfall [Mon, 23 Jun 2014 12:59:59 +0000 (08:59 -0400)]
Don't add a perldelta entry for _charnames.

It's never been listed and it doesn't link properly, breaking
podcheck.t

9 years agoRMG: Show that version'd binaries might be used
Matthew Horsfall [Mon, 23 Jun 2014 12:41:09 +0000 (08:41 -0400)]
RMG: Show that version'd binaries might be used

9 years agoRMG: Use -Dusedevel in ./Configure, like everywhere else in the RMG.
Matthew Horsfall [Mon, 23 Jun 2014 12:40:08 +0000 (08:40 -0400)]
RMG: Use -Dusedevel in ./Configure, like everywhere else in the RMG.

9 years agoRMG: Remove useless 'make distclean', save time
Matthew Horsfall [Mon, 23 Jun 2014 12:37:31 +0000 (08:37 -0400)]
RMG: Remove useless 'make distclean', save time

9 years agoUpdate makerel to provide a helpful error message if chmod fails on @writables
Matthew Horsfall [Mon, 23 Jun 2014 12:31:47 +0000 (08:31 -0400)]
Update makerel to provide a helpful error message if chmod fails on @writables

9 years agoUpdate RMG to mention new policy of perlhist containing RMs names.
Matthew Horsfall [Mon, 23 Jun 2014 12:15:11 +0000 (08:15 -0400)]
Update RMG to mention new policy of perlhist containing RMs names.

9 years agoIf we do not have vsnprintf, the len is unused.
Jarkko Hietaniemi [Sat, 21 Jun 2014 12:05:08 +0000 (08:05 -0400)]
If we do not have vsnprintf, the len is unused.

9 years agoIn response to 7fefc6c, make autodoc smarter.
Matthew Horsfall [Sun, 22 Jun 2014 11:37:09 +0000 (07:37 -0400)]
In response to 7fefc6c, make autodoc smarter.

All non-blank lines after a =head1 are now skipped to find
header documentation. This unearthed a few more missed headings
that I think are useful, and makes sure others aren't missed in
the future.

Also, fix line number counting/error reporting in autodoc.pl, it
was woefully inaccurate.

9 years agoAllow enabling -pedantic(-errors) (with -std=c89) for the core.
Jarkko Hietaniemi [Fri, 20 Jun 2014 13:01:53 +0000 (09:01 -0400)]
Allow enabling -pedantic(-errors) (with -std=c89) for the core.

The core was already -pedantic clean (with default config, with
DEBUGGING almost), cflags just needed some juggling, somewhat
complicated by the logic of -Werror=declaration-after-statement.

Still requires -Dgccansipedantic to enable the -pedantic because
otherwise we do not use things like gcc brace groups and C99 variadic
macros, which are nice.  Also, see below about usedtrace complications.
(the gccansipedantic logic was odd, probably not used for a while.)

Under -DDEBUGGING the -pedantic requires quieting the warnings
about overlong string literals.

Disable -pedantic et al if usedtrace is enabled, it uses too many
non-standard features (and it depends on code generated by an external
framework).

9 years agog++ -DPERL_GLOBAL_STRUCT_PRIVATE died on this.
Jarkko Hietaniemi [Sun, 22 Jun 2014 02:52:43 +0000 (22:52 -0400)]
g++ -DPERL_GLOBAL_STRUCT_PRIVATE died on this.

9 years agoTry simpler usage for file-level GCC_DIAG_RESTORE.
Jarkko Hietaniemi [Fri, 20 Jun 2014 13:04:34 +0000 (09:04 -0400)]
Try simpler usage for file-level GCC_DIAG_RESTORE.

9 years agoIPC-Open3.t: For d3ae482b also need the "SKIP" label from the original.
George Greer [Sat, 21 Jun 2014 23:17:09 +0000 (19:17 -0400)]
IPC-Open3.t: For d3ae482b also need the "SKIP" label from the original.

9 years agoFix black Win32 smoke broken by my v5.21.1-11-g4077a6b (yet again)
Ævar Arnfjörð Bjarmason [Sat, 21 Jun 2014 21:13:43 +0000 (21:13 +0000)]
Fix black Win32 smoke broken by my v5.21.1-11-g4077a6b (yet again)

I was being silly with my test improvements in v5.21.1-12-g826af13 and
v5.21.1-13-g43d7f0d. I haven't been able to test this on Win32 where
it's breaking, but if the sprintf format isn't recognized there we're
going to get a warning about a *redundant* argument in printf, not a
missing one, i.e. just like this:

    $ ./perl -Ilib -we 'printf "%æ\n", "str"'
    Invalid conversion in printf: "%\303" at -e line 1.
    Redundant argument in printf at -e line 1.
    %s

So fix that, I'm certain this will fix the black smoke on Win32, if not
I have no idea what's going on.

9 years agoFix test file per George Greer comment.
James E Keenan [Sat, 21 Jun 2014 21:14:46 +0000 (23:14 +0200)]
Fix test file per George Greer comment.

9 years agolib/locale.t: Improve debug info
Karl Williamson [Sat, 21 Jun 2014 19:23:42 +0000 (13:23 -0600)]
lib/locale.t: Improve debug info

I find myself needing to get the percentage of locales failing when
looking at field reports with debugging on.  This commit adds that
information.

9 years agoMake like() and unlike() in t/test.pl refuse non-qr// arguments
Ævar Arnfjörð Bjarmason [Sat, 21 Jun 2014 17:44:20 +0000 (17:44 +0000)]
Make like() and unlike() in t/test.pl refuse non-qr// arguments

As I noted in v5.21.1-12-g826af13 we have subtle bugs in the test suite
because you can do e.g. like($@, '') now which'll be a passing test even
when we have an error, because $@ =~ // will be true.

I'm just changing t/test.pl to not accept non-Regexp arguments, and
fixing up a bunch of test failures that resulted from that. There might
still be more of these in tests that I'm just not running, I've also
changed some of these from $str =~ /foo/ to $str eq 'foo'
(i.e. s/like/is/) in cases where that appeared to work, but it might
break some systems.

Let's just find that out via the smokers.

9 years agoFix black Win32 smoke broken by my v5.21.1-11-g4077a6b (again)
Ævar Arnfjörð Bjarmason [Sat, 21 Jun 2014 17:57:40 +0000 (17:57 +0000)]
Fix black Win32 smoke broken by my v5.21.1-11-g4077a6b (again)

Fix a silly bug in v5.21.1-12-g826af13, when $Q was false I added 12
extra test, but didn't declare them, do that.

9 years agoFix black Win32 smoke broken by my v5.21.1-11-g4077a6b
Ævar Arnfjörð Bjarmason [Sat, 21 Jun 2014 16:23:29 +0000 (16:23 +0000)]
Fix black Win32 smoke broken by my v5.21.1-11-g4077a6b

The problem with this was that I didn't test this on a system where $Q
was false. On those systems we not only warn about "Invalid conversion"
but also about the missing sprintf argument, as intended.

The test broke because the local __WARN__ handler would clobber the
"conversion" warning with the "missing" warning, the fix is easy, just
accumulate the warnings with ".=".

While poking at this I discovered a bug that's been here ever since the
test was added back in v5.10.0-1461-g53f65a9. If we emitted a warning on
systems where $Q was true we'd pass the test, this is because the empty
regex will match warnings, the test actually meant to use is() not
like(). It's also a bug that t/test.pl accepts non-regexes as the second
argument, Test::More doesn't:

    $ perl -MTest::More -wle 'like "", ""'
    not ok 1
    #   Failed test at -e line 1.
    #     '' doesn't look much like a regex to me.
    # Tests were run but no plan was declared and done_testing() was not seen.

This change might cause some additional black smoke because we'll now be
detecting warnings that we previously ignored, but I don't think this'll
fail on systems where $Q is true.

9 years agoAdd a new warning about redundant printf arguments
Ævar Arnfjörð Bjarmason [Sun, 19 Jan 2014 16:27:58 +0000 (16:27 +0000)]
Add a new warning about redundant printf arguments

Implement RT #121025 and add a "redundant" warning category that
currently only warns about redundant arguments to printf. Now similarly
to how we already warned about missing printf arguments:

    $ ./miniperl -Ilib -we 'printf "%s\n", qw()'
    Missing argument in printf at -e line 1.

We'll now warn about redundant printf arguments:

    $ ./miniperl -Ilib -we 'printf "%s\n", qw(x y)'
    Redundant argument in printf at -e line 1.
    x

The motivation for this is that I recently fixed an insidious
long-standing 6 year old bug in a codebase I maintain that came down to
an issue that would have been detected by this warning.

Things to note about this patch:

 * It found a some long-standing redundant printf arguments in our own
   ExtUtils::MakeMaker code which I submitted fixes to in
   https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/pull/84 and
   https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/pull/86,
   those fixes were merged into blead in v5.19.8-265-gb33b7ab

 * This warning correctly handles format parameter indexes (e.g. "%1$s")
   for some value of correctly. See the comment in t/op/sprintf2.t for
   an extensive discussion of how I've handled that.

 * We do the correct thing in my opinion when a pattern has redundant
   arguments *and* an invalid printf format. E.g. for the pattern "%A%s"
   with one argument we'll just warn about an invalid format as before,
   but with two arguments we'll warn about the invalid format *and* the
   redundant argument.

   This helps to disambiguate cases where the user just meant to write a
   literal "%SOMETHING" v.s. cases where he though "%S" might be a valid
   printf format.

 * I originally wrote this while the 5.19 series was under way, but Dave
   Mitchell has noted that a warning like this should go into blead
   after 5.20 is released:

       "[...] I think it should go into blead just after 5.20 is
       released, rather than now; I think it'd going to kick up a lot of
       dust and we'll want to give CPAN module owners maximum lead time
       to fix up their code. For example, if its generating warnings in
       cpan/ code in blead, then we need those module authors to fix
       their code, produce stable new releases, pull them back into
       blead, and let them bed in before we start pushing out 5.20 RC
       candidates"

   I agree, but we could have our cake and eat it too if "use warnings"
   didn't turn this on but an explicit "use warnings qw(redundant)" did.
   Then in 5.22 we could make "use warnings" also import the "redundant"
   category, and in the meantime you could turn this on
   explicitly.

   There isn't an existing feature for adding that kind of warning in
   the core. And my attempts at doing so failed, see commentary in RT
   #121025.

The warning needed to be added to a few places in sv.c because the "",
"%s" and "%-p" patterns all bypass the normal printf handling for
optimization purposes. The new warning works correctly on all of
them. See the tests in t/op/sprintf2.t.

It's worth mentioning that both Debian Clang 3.3-16 and GCC 4.8.2-12
warn about this in C code under -Wall:

    $ cat redundant.c
    #include <stdio.h>

    int main(void) {
        printf("%d\n", 123, 345);
        return 0;
    }
    $ clang -Wall -o redundant redundant.c
    redundant.c:4:25: warning: data argument not used by format string [-Wformat-extra-args]
        printf("%d\n", 123, 345);
               ~~~~~~       ^
    1 warning generated.
    $ gcc -Wall -o redundant redundant.c
    redundant.c: In function ‘main’:
    redundant.c:4:5: warning: too many arguments for format [-Wformat-extra-args]
         printf("%d\n", 123, 345);
         ^

So I'm not the first person to think that this might be generally
useful.

There are also other internal functions that could benefit from
missing/redundant warnings, e.g. pack. Neither of these things currently
warn, but should:

    $ perl -wE 'say pack "AA", qw(x y z)'
    xy
    $ perl -wE 'say pack "AAAA", qw(x y z)'
    xyz

I'll file a bug for that, and might take a stab at implementing it.

9 years agoSplit up the fake "missing" warning category into an actual category
Ævar Arnfjörð Bjarmason [Sun, 19 Jan 2014 14:58:02 +0000 (14:58 +0000)]
Split up the fake "missing" warning category into an actual category

Ever since the warning for missing printf arguments was added in
v5.11.2-116-g7baa469 the "missing" warning category has been defined in
terms of the "uninitialized" category, so you couldn't turn it on/off
independently of that.

As discussed in RT #121025 I'm hacking on adding a new "reduntant"
category for too many printf arguments. So add the long-missing
"missing" category in preparation for that for consistency.

9 years agoRevert 6 tests failing on Win32 smoker.
James E Keenan [Sat, 21 Jun 2014 13:04:12 +0000 (09:04 -0400)]
Revert 6 tests failing on Win32 smoker.

9 years agoUntie STDERR in IPC::Open3.
Dmitri Tikhonov [Sat, 7 Jun 2014 04:23:50 +0000 (00:23 -0400)]
Untie STDERR in IPC::Open3.

Add Dmitri Tikhonov to Perl 5 AUTHORS.
Increment IPC/Open3.pm $VERSION.

For: RT #119843, originally reported by A.N.

9 years agoFix typo... nothing to see here
Matthew Horsfall (alh) [Fri, 20 Jun 2014 18:59:01 +0000 (14:59 -0400)]
Fix typo... nothing to see here

9 years agoCorrect unintentional mistake in bump-perl-version
Chris 'BinGOs' Williams [Fri, 20 Jun 2014 18:35:25 +0000 (19:35 +0100)]
Correct unintentional mistake in bump-perl-version

9 years agoperlfunc: clarify our [perl #122132]
David Golden [Fri, 20 Jun 2014 14:16:27 +0000 (10:16 -0400)]
perlfunc: clarify our [perl #122132]

9 years agoUpdate Module::CoreList for 5.21.2
Matthew Horsfall (alh) [Fri, 20 Jun 2014 17:15:06 +0000 (13:15 -0400)]
Update Module::CoreList for 5.21.2

9 years agoBump the perl version in various places for 5.21.2
Matthew Horsfall (alh) [Fri, 20 Jun 2014 17:04:41 +0000 (13:04 -0400)]
Bump the perl version in various places for 5.21.2

9 years agoAdd Epipgraph for 5.21.1
Matthew Horsfall (alh) [Fri, 20 Jun 2014 17:03:30 +0000 (13:03 -0400)]
Add Epipgraph for 5.21.1

9 years agoAdd new perldelta for 5.21.2
Matthew Horsfall (alh) [Fri, 20 Jun 2014 16:09:57 +0000 (12:09 -0400)]
Add new perldelta for 5.21.2

9 years agoAdd new release to perlhist v5.21.1
Matthew Horsfall (alh) [Fri, 20 Jun 2014 12:21:52 +0000 (08:21 -0400)]
Add new release to perlhist

9 years agoFinalize perldelta
Matthew Horsfall (alh) [Fri, 20 Jun 2014 12:18:59 +0000 (08:18 -0400)]
Finalize perldelta

9 years agoUpdate Module::CoreList for 5.21.1
Matthew Horsfall (alh) [Fri, 20 Jun 2014 11:52:56 +0000 (07:52 -0400)]
Update Module::CoreList for 5.21.1

9 years agoUpdate perldelta acknowledgements
Matthew Horsfall (alh) [Fri, 20 Jun 2014 11:32:28 +0000 (07:32 -0400)]
Update perldelta acknowledgements

9 years agoBegin to finalize perldelta for release
Matthew Horsfall (alh) [Fri, 20 Jun 2014 11:29:07 +0000 (07:29 -0400)]
Begin to finalize perldelta for release

9 years agoGCC_DIAG_IGNORE/RESTORE whine in non-gcc if at file level.
Jarkko Hietaniemi [Fri, 20 Jun 2014 02:03:25 +0000 (22:03 -0400)]
GCC_DIAG_IGNORE/RESTORE whine in non-gcc if at file level.

9 years agoCouple more (optionally) unused contexts.
Jarkko Hietaniemi [Thu, 19 Jun 2014 18:40:36 +0000 (14:40 -0400)]
Couple more (optionally) unused contexts.

9 years agoAvoid blank lines in backslash warnings test.
Craig A. Berry [Thu, 19 Jun 2014 23:29:35 +0000 (18:29 -0500)]
Avoid blank lines in backslash warnings test.

This is a follow-up to 12f55bbce575aecc, which fell victim to a
bug workaround. Because the broken pipes on VMS sometimes put
multiple blank lines in test output, we collapse multiple newlines
into one.  Which breaks tests that genuinely have multiple blank
lines in the output.

So don't leave the output blank, which coincidentally makes it a
lot easier to see which print statement produces which line of
output.

9 years agofix a typo in perl520delta
Ricardo Signes [Thu, 19 Jun 2014 23:22:27 +0000 (19:22 -0400)]
fix a typo in perl520delta

9 years agoRemove x2p remnants
Matthew Horsfall (alh) [Thu, 19 Jun 2014 23:19:44 +0000 (19:19 -0400)]
Remove x2p remnants

9 years agoRemove old file from @writables; was taken out in autodie 2.24
Matthew Horsfall (alh) [Thu, 19 Jun 2014 22:54:57 +0000 (18:54 -0400)]
Remove old file from @writables; was taken out in autodie 2.24

9 years agoIn case someone manages to call g++ with -Wc++-compat.
Jarkko Hietaniemi [Thu, 19 Jun 2014 21:55:34 +0000 (17:55 -0400)]
In case someone manages to call g++ with -Wc++-compat.

9 years agoNote the open RT ticket.
Jarkko Hietaniemi [Thu, 19 Jun 2014 19:08:25 +0000 (15:08 -0400)]
Note the open RT ticket.

9 years agoDisable ODBM (via i_dbm) in HP-UX, seems to be buggy.
Jarkko Hietaniemi [Thu, 19 Jun 2014 16:07:26 +0000 (12:07 -0400)]
Disable ODBM (via i_dbm) in HP-UX, seems to be buggy.

9 years agoLower the optimization on Digest-SHA for HP-UX cc.
Jarkko Hietaniemi [Thu, 19 Jun 2014 15:33:32 +0000 (11:33 -0400)]
Lower the optimization on Digest-SHA for HP-UX cc.

Upstream, but we are adding a platform specific hints file.

9 years agoHP-UX cc in PA-RISC2.0 optimizer crashes with some files.
Jarkko Hietaniemi [Thu, 19 Jun 2014 15:13:00 +0000 (11:13 -0400)]
HP-UX cc in PA-RISC2.0 optimizer crashes with some files.

9 years agoThe g++ flags removal was not right.
Jarkko Hietaniemi [Thu, 19 Jun 2014 13:44:59 +0000 (09:44 -0400)]
The g++ flags removal was not right.

9 years agoSilence -Wunused-parameter my_perl under threads.
Jarkko Hietaniemi [Wed, 18 Jun 2014 22:56:45 +0000 (18:56 -0400)]
Silence -Wunused-parameter my_perl under threads.

For S_ functions, remove the context.
For Perl_ functions, add PERL_UNUSED_CONTEXT.

Tricky because sometimes depends on DEBUGGING, and sometimes
on whether we are have PERL_IMPLICIT_SYS.

(Why all the mathoms Perl_is_uni_... and Perl_is_utf8_...
functions are not being whined about is a mystery.)

vutil.c (included via util.c) has one of these, but it's cpan/,
and a known problem: https://rt.cpan.org/Ticket/Display.html?id=96100

9 years agoRevert "/* NOTREACHED */ belongs *before* the unreachable."
Jarkko Hietaniemi [Thu, 19 Jun 2014 15:19:54 +0000 (11:19 -0400)]
Revert "/* NOTREACHED */ belongs *before* the unreachable."

This reverts commit 148f39b7de6eae9ddd59e0b0aff691d6abea7aca.

(Still needs more work, but wanted to see how well this passed with Jenkins.)

9 years ago/* NOTREACHED */ belongs *before* the unreachable.
Jarkko Hietaniemi [Thu, 19 Jun 2014 10:43:08 +0000 (06:43 -0400)]
/* NOTREACHED */ belongs *before* the unreachable.

Definitely not *after* it.  It marks the start of the unreachable,
not the first unrechable line.  And if they are in that order,
it looks better to linebreak after the lint hint.

9 years agoRevert the perl.h part of a3ccabc.
Jarkko Hietaniemi [Wed, 18 Jun 2014 21:53:48 +0000 (17:53 -0400)]
Revert the perl.h part of a3ccabc.

(Worked in smokes, bombed under Jenkins.)

9 years agoGCC_DIAG_IGNORE needs to end with semicolon (inline.h).
Jarkko Hietaniemi [Wed, 18 Jun 2014 19:36:17 +0000 (15:36 -0400)]
GCC_DIAG_IGNORE needs to end with semicolon (inline.h).

Furthermore, make the GCC_DIAG_IGNORE and _RESTORE to be dNOOPs,
so that they can be at any level of the code, including global, even
when the compiler is not gcc (or lookalike).  If they are just empty,
";" will be left at the call site.

9 years agoRegenerate podcheck.t db for new too-long verbatim lines
Karl Williamson [Wed, 18 Jun 2014 19:33:59 +0000 (13:33 -0600)]
Regenerate podcheck.t db for new too-long verbatim lines

9 years agoPATCH: [perl #122126] BBC DBD::SQLite
Karl Williamson [Wed, 18 Jun 2014 19:01:41 +0000 (13:01 -0600)]
PATCH: [perl #122126] BBC DBD::SQLite

This problem turns out to be a misspelling in two places of a compiler
definition.  Since the definition didn't exist (as it was misspelled),
the #ifdef failed.

I don't know how really to test this as it is locale collation, which
varies by locale, and we would be relying on vendor-supplied locales
which may be inconsistent between platforms.  I intend to tackle
improvements to collaction later this release cycle, and should come up
with tests at that time.  The failing tests in the module were comparing
the Perl sort results with those of the module, and finding they differ.

9 years agoAdd a note about the HP-UX "internal linkage" warning.
Jarkko Hietaniemi [Wed, 18 Jun 2014 18:58:03 +0000 (14:58 -0400)]
Add a note about the HP-UX "internal linkage" warning.

9 years agoTry silencing the infamous PerlSIO_set_ptr in perlio.c.
Jarkko Hietaniemi [Wed, 18 Jun 2014 15:10:22 +0000 (11:10 -0400)]
Try silencing the infamous PerlSIO_set_ptr in perlio.c.

9 years ago__clang__ seems to be thing, but leave also __clang.
Jarkko Hietaniemi [Wed, 18 Jun 2014 15:09:05 +0000 (11:09 -0400)]
__clang__ seems to be thing, but leave also __clang.

This fixes the GCC_DIAG_IGNORE() + GCC_DIAG_RESTORE with clang.

9 years agoAdd note about the -std=c89 needing -pedantic.
Jarkko Hietaniemi [Wed, 18 Jun 2014 15:49:40 +0000 (11:49 -0400)]
Add note about the -std=c89 needing -pedantic.

9 years agoEcho also these added options.
Jarkko Hietaniemi [Wed, 18 Jun 2014 13:20:18 +0000 (09:20 -0400)]
Echo also these added options.

9 years ago-Wextra is the new -W, do not use both.
Jarkko Hietaniemi [Wed, 18 Jun 2014 13:12:18 +0000 (09:12 -0400)]
-Wextra is the new -W, do not use both.

9 years ago-Wendif-labels is actually the default.
Jarkko Hietaniemi [Wed, 18 Jun 2014 13:06:26 +0000 (09:06 -0400)]
-Wendif-labels is actually the default.

Has been AFAICT for years / always, the documentation just
had it wrong in pre-4.0 gccs.

9 years agoEnable -Werror=declaration-after-statement.
Jarkko Hietaniemi [Wed, 18 Jun 2014 13:04:24 +0000 (09:04 -0400)]
Enable -Werror=declaration-after-statement.

For C89 compliancy, this is the most common thinko people make.
While waiting for -pedantic -std=c89, which will catch the same.

9 years agoComment tweaking.
Jarkko Hietaniemi [Wed, 18 Jun 2014 12:44:52 +0000 (08:44 -0400)]
Comment tweaking.

9 years agoMake also cflags.SH clean with g++ -Wunused-*
Jarkko Hietaniemi [Wed, 18 Jun 2014 12:43:37 +0000 (08:43 -0400)]
Make also cflags.SH clean with g++ -Wunused-*

"clean" as in "not needed anymore".

9 years agoWith this we are g++ -Wunused-* clean.
Jarkko Hietaniemi [Wed, 18 Jun 2014 12:52:17 +0000 (08:52 -0400)]
With this we are g++ -Wunused-* clean.

9 years agoLooks like the core is now -Wunused-value clean with clang.
Jarkko Hietaniemi [Wed, 18 Jun 2014 12:27:54 +0000 (08:27 -0400)]
Looks like the core is now -Wunused-value clean with clang.

Another possibility is that clang has become smarter,
and that needs to be made dependent on clang version.
But for now, let's opt for simplicity and less logic.

9 years agoAvoid missing return warning in pp_die.
Craig A. Berry [Wed, 18 Jun 2014 16:40:28 +0000 (11:40 -0500)]
Avoid missing return warning in pp_die.

Even though it can't be reached, the absence of a return statement
makes the VMS C compiler warn that it's missing.

9 years agocflags.SH: Whitespace only.
Jarkko Hietaniemi [Wed, 18 Jun 2014 12:04:22 +0000 (08:04 -0400)]
cflags.SH: Whitespace only.

9 years agoMove ccflags edits to extraction time.
Jarkko Hietaniemi [Mon, 16 Jun 2014 12:49:13 +0000 (08:49 -0400)]
Move ccflags edits to extraction time.

(Except for the possible toke_cflags customizations.)

Do the -Wno-unused-... edits only if -Wall.

Echo the edits done during extraction time, to make the magic more visible.

9 years agoAllow cflags.SH edits to ccflags to stick.
Jarkko Hietaniemi [Mon, 16 Jun 2014 12:32:48 +0000 (08:32 -0400)]
Allow cflags.SH edits to ccflags to stick.

9 years agolib/locale.t: White space only
Karl Williamson [Tue, 17 Jun 2014 19:11:46 +0000 (13:11 -0600)]
lib/locale.t: White space only

Indent inside a newly-formed block

9 years agolib/locale.t: Skip testing $! unless LC_MESSAGES exists
Karl Williamson [Tue, 17 Jun 2014 19:10:04 +0000 (13:10 -0600)]
lib/locale.t: Skip testing $! unless LC_MESSAGES exists

Some platforms don't have LC_MESSAGES for some or all locales, so skip
these tests on them.

9 years agoPATCH:[perl #12202] locale fails on OS X
Karl Williamson [Tue, 17 Jun 2014 18:26:05 +0000 (12:26 -0600)]
PATCH:[perl #12202] locale fails on OS X

It turns out that the bug is in OS X for this Chinese Big5 locale.  So
this patch just makes the failing test one that we don't fail the whole
.t for unless too many locales fail.

9 years agolib/locale.t: Don't test strftime without LC_TIME
Karl Williamson [Tue, 17 Jun 2014 18:20:39 +0000 (12:20 -0600)]
lib/locale.t: Don't test strftime without LC_TIME

On netbsd, not all locales have an LC_TIME, and so they are all failing
the tests for that.  This is true even though they have LC_ALL.  I don't
know if that is legal or not, but Perl can't do anything about it, so
this skips the LC_TIME tests for locales that don't have it.

9 years agolib/locale.t: Add %p to strftime test
Karl Williamson [Tue, 17 Jun 2014 18:19:23 +0000 (12:19 -0600)]
lib/locale.t: Add %p to strftime test

This can also output alpha text, so should be included in the alpha
tests for strftime.

9 years agolib/locale.t: Add debugging statement
Karl Williamson [Tue, 17 Jun 2014 18:10:40 +0000 (12:10 -0600)]
lib/locale.t: Add debugging statement

This will aid in debugging on platforms where strftime has problems

9 years agolib/locale.t: Add debugging subroutine
Karl Williamson [Tue, 17 Jun 2014 18:07:51 +0000 (12:07 -0600)]
lib/locale.t: Add debugging subroutine

This prints out a string unambiguously, both well and ill-formed UTF-8.
The next commit will use it.

9 years agolib/locale.t: Modify debug statements
Karl Williamson [Tue, 17 Jun 2014 17:52:59 +0000 (11:52 -0600)]
lib/locale.t: Modify debug statements

The debugging statements should begin with a '#' so TAP ignores them.
It's easier to do this in the subroutine that prints them, rather than
remember to do so in each call to it.  This doesn't change the few
debugf() calls, because one doesn't want a # (it just outputs an empty
line)

9 years agolib/locale.t: Don't test locales without LC_NUMERIC
Karl Williamson [Tue, 17 Jun 2014 17:50:48 +0000 (11:50 -0600)]
lib/locale.t: Don't test locales without LC_NUMERIC

There are quite a few tests that depend on LC_NUMERIC.  Some platforms
will say they have LC_ALL, but that doesn't include all the official
categories, so check that does include LC_NUMERIC

9 years agolib/locale.t: Refactor some tests common to 2 branches
Karl Williamson [Mon, 16 Jun 2014 15:55:42 +0000 (09:55 -0600)]
lib/locale.t: Refactor some tests common to 2 branches

These tests can go in the same straight-line code as they are the same
in both branches they were previously in.

9 years agolib/locale.t: Add debugging statement
Karl Williamson [Mon, 16 Jun 2014 03:57:19 +0000 (21:57 -0600)]
lib/locale.t: Add debugging statement

This prints only during debugging the percentage of locales that fail
tests that exceed the permissible failure rate..

9 years agoperldelta for fatalizing defined(@), hash as ref
Karl Williamson [Wed, 18 Jun 2014 01:54:42 +0000 (19:54 -0600)]
perldelta for fatalizing defined(@), hash as ref

I forgot to include these in the initial commits

9 years agoperldelta: Move MAD notice to "Config" section
Karl Williamson [Wed, 18 Jun 2014 01:53:59 +0000 (19:53 -0600)]
perldelta: Move MAD notice to "Config" section

9 years agot/re/pat_advanced.t: Remove a 'use encoding'
Karl Williamson [Wed, 18 Jun 2014 01:02:05 +0000 (19:02 -0600)]
t/re/pat_advanced.t: Remove a 'use encoding'

'use encoding "latin1"' has the effect of causing \x80 - \xFF to be
treated as Unicode characters in a regular expression, which is the same
thing as the /u modifier does.  The pragma may eventually be removed, so
replace it by the more modern way to get the same effect

9 years agoOptimize regen/regcharclass.pl
Tony Cook [Wed, 18 Jun 2014 00:48:04 +0000 (10:48 +1000)]
Optimize regen/regcharclass.pl

This became noticably slower recently, these changes don't return us
to the previous runtimes, but they do improve things.

9 years agoavoid copying the while ebcidic mapping to the stack calling get_a2n()
Tony Cook [Tue, 10 Jun 2014 06:18:34 +0000 (16:18 +1000)]
avoid copying the while ebcidic mapping to the stack calling get_a2n()

from 41.6sec to 34.1sec

get_a2n() is called 181540 times by __uni_latin1() which in most cases
doesn't use the whole table.  Other callers tend to use the whole
table, so make a copy.

9 years agoavoid copying the whole map to the stack on each call to get_I8_2_utf()
Tony Cook [Tue, 10 Jun 2014 06:07:12 +0000 (16:07 +1000)]
avoid copying the whole map to the stack on each call to get_I8_2_utf()

took run time from 51.6 sec to 41.6 sec

get_I8_2_utf() is called 147000 times by cp_2_utfbytes() which
typically doesn't use the whole table, so return a reference instead to.

9 years agoRevert the removal of 'use encoding'
Karl Williamson [Wed, 18 Jun 2014 00:00:13 +0000 (18:00 -0600)]
Revert the removal of 'use encoding'

We've decided to not remove 'use encoding' in v5.20.

This reverts commits b017fe877ad78f04afaa3c1327fc46391f572bfb,
7053d92917f7cb46452de86dc4c6d8644cae849c, and
b06e47f717f77453fbdaef628efc2b9c83898a8b

9 years agoperl.h: White-space only
Karl Williamson [Thu, 12 Jun 2014 21:11:43 +0000 (15:11 -0600)]
perl.h: White-space only

9 years agoUpdate INSTALL
Matthew Horsfall (alh) [Tue, 17 Jun 2014 23:42:33 +0000 (19:42 -0400)]
Update INSTALL

9 years agoUpdate perldelta for new/changed diagnostics
Matthew Horsfall (alh) [Tue, 17 Jun 2014 23:29:30 +0000 (19:29 -0400)]
Update perldelta for new/changed diagnostics

9 years agoperldelta for d0a29c3
Matthew Horsfall (alh) [Tue, 17 Jun 2014 22:48:28 +0000 (18:48 -0400)]
perldelta for d0a29c3

9 years agoperldelta for f31006c
Matthew Horsfall (alh) [Tue, 17 Jun 2014 22:38:49 +0000 (18:38 -0400)]
perldelta for f31006c

9 years agoCorrect two subtle typos.
Michael Bunk [Tue, 17 Jun 2014 22:35:33 +0000 (18:35 -0400)]
Correct two subtle typos.

Add Michael Bunk to Perl AUTHORS.

For: https://rt.perl.org/Ticket/Display.html?id=122120

9 years agoepigraphs: add the v5.20.0-RC1 epigraph
Ricardo Signes [Tue, 17 Jun 2014 21:11:29 +0000 (17:11 -0400)]
epigraphs: add the v5.20.0-RC1 epigraph

9 years agoPATCH: [perl #121816] Add warning for repetition x < 0
Karl Williamson [Tue, 17 Jun 2014 15:39:51 +0000 (09:39 -0600)]
PATCH: [perl #121816] Add warning for repetition x < 0

I consider this experimental, so that if code breaks as a result, we
will remove it.

I chose the numeric warnings category.  But misc or a new subcategory of
numeric might be better choices.

There is also the issue if someone is calculating the repeat count in
floating point and gets something that would be 0 if there were infinite
precision, but ends up being a very small negative number.  The current
implementation will warn on that, but probably shouldn't.  I suspect that
this would be extremely rare in practice.