This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Consolidate 2nd pass for warnings
authorKarl Williamson <khw@cpan.org>
Mon, 8 Oct 2018 14:00:39 +0000 (08:00 -0600)
committerKarl Williamson <khw@cpan.org>
Sat, 20 Oct 2018 06:09:55 +0000 (00:09 -0600)
commit338190a18eccb1ef48c5ee705398b9277ca00b00
treeea1947f9235dfacc6e57c976d290aa969fe59c7f
parentaea5f181337e28c43dd91a67dcf9d8498a04731b
regcomp.c: Consolidate 2nd pass for warnings

Warnings have to generally be delayed being output until the 2nd pass,
as the first pass can be restarted multiple times, and so the same
warning could be output multiple times if the restarted code outputs a
warning.

Prior to this commit, there was an assert that the warnings are being
output in the 2nd pass.  This commit changes it so that the assert is
turned into an 'if' in common code, and the dispersed 'if's that
formerly were used are removed as much as possible.  If that removes an
indented block, this commit also outdents the block contents.
regcomp.c