This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
silence -Wparentheses-equality
authorDavid Mitchell <davem@iabyn.com>
Mon, 28 Mar 2016 09:52:18 +0000 (10:52 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 28 Mar 2016 10:04:36 +0000 (11:04 +0100)
commit9d9905599cad5eeb33b2a64c023b97005694fbcd
tree319eb231de52a6b72cc87415d10fc95ba5b2c16a
parent4caf7d8c4666d39b6b752a52ec5e19d9504f5f31
silence -Wparentheses-equality

Clang has taken it upon itself to warn when an equality is wrapped in
double parentheses, e.g.

    ((foo == bar))

Which is a bit dumb, as any code along the lines of

    #define isBAR (foo == BAR)
    if (isBAR) {}

will trigger the warning.

This commit shuts clang up by putting in a harmless cast:

    #define isBAR cBOOL(foo == BAR)
cop.h
perl.h
regcomp.h
regen/warnings.pl
warnings.h