This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
spurious "Use of "-x" without parentheses" mesg
authorDavid Mitchell <davem@iabyn.com>
Tue, 22 Oct 2013 15:48:16 +0000 (16:48 +0100)
committerDavid Mitchell <davem@iabyn.com>
Tue, 22 Oct 2013 16:01:30 +0000 (17:01 +0100)
commit46879fadd034dcb5d6f720076845767f8ccf152d
tree0c165f352ef17b1fac2e665cc83118421961886b
parentfcbc518d7ac7875b7f443e72caf15fd07ab023a6
spurious "Use of "-x" without parentheses" mesg

RT #120288.

Something like '-X' at the start of a line (where X is one char, but not a
filetest operator) was giving a spurious

    Warning: Use of "-a" without parentheses is ambiguous

error. This was because the toker was provisionally marking the -a as the
last encountered unary operator (PL_last_uni), then not unmarking it when
it found that that it wasn't in fact a filetest operator.
t/lib/warnings/toke
toke.c