develooper Front page | perl.perl5.porters | Postings from June 2013

[perl #118693] No warning for undef'd variables returned from XS under -w

Thread Next
From:
Father Chrysostomos via RT
Date:
June 30, 2013 01:52
Subject:
[perl #118693] No warning for undef'd variables returned from XS under -w
Message ID:
rt-3.6.HEAD-2552-1372557135-1988.118693-15-0@perl.org
On Sat Jun 29 17:23:31 2013, public@khwilliamson.com wrote:
> 
> This is a bug report for perl from khw@karl.(none),
> generated with the help of perlbug 1.39 running under perl 5.19.2.
> 
> 
> -----------------------------------------------------------------
> This is fallout from
> https://rt.perl.org/rt3/Ticket/Display.html?id=115808
> 
> Uupon error POSIX::setlocale is setting RETVAL to NULL.  According to
> Leon Timmermans, the char* return should typemap that to undef, but
> the
> ticket indicates no undef warning is generated:
> 
> $ perl -wle 'use POSIX; print setlocale LC_ALL, "mtfnpy"'
> 
> If I change the setlocale code to instead do an XSRETURN_UNDEF, the
> warning gets generated.
> 
> Leon did some digging and says that 91bba347 suppresses the warnings
> for
> PADTMP SVs

This is similar to the exception for read-only variables that I recently
removed from sv_force_normal.  It was hiding several bugs.

I wonder whether we cannot remove the undef PADTMP exception.  It would
just make everything a little more sane.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=118693

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About