This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.c: Fix warning category and subcategory conflicts
authorKarl Williamson <public@khwilliamson.com>
Wed, 1 Jan 2014 04:45:54 +0000 (21:45 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 1 Jan 2014 20:49:24 +0000 (13:49 -0700)
commit54f4afefabe5f838538f462f1e2bb40a64b6bb77
treeeeeb292ec3148f721dad4964d36549386a406856
parent0cfa64bfe0ab570e7b2ddddfdad71f8341a5e6e1
utf8.c: Fix warning category and subcategory conflicts

The warnings categories non_unicode, nonchar, and surrogate are all
subcategories of 'utf8'.  One should never call a packWARN() with both a
category and a subcategory of it, as it will mean that one can't
completely make the subcategory independent.  For example,

    use warnings 'utf8';
    no warnings 'surrogate';

surrogate warnings will be output if they are tested with a

    ckWARN2(WARN_UTF8, WARN_SURROGATE);

utf8.c was guilty of this.
ext/XS-APItest/t/utf8.t
pod/perldiag.pod
utf8.c