[perl #3330] avoid an uncaught warning from op/inc.t

and add a warnings.t test case to check for that warning