develooper Front page | perl.perl5.porters | Postings from January 2019

[perl #133575] op.c: 'clobbered' warning becomes un-silenced withg++-8

Thread Previous
From:
Tony Cook via RT
Date:
January 3, 2019 00:29
Subject:
[perl #133575] op.c: 'clobbered' warning becomes un-silenced withg++-8
Message ID:
rt-4.0.24-31855-1546475356-1982.133575-15-0@perl.org
On Mon, 15 Oct 2018 04:01:54 -0700, davem wrote:
> On Wed, Oct 10, 2018 at 12:12:51PM -0700, James E Keenan (via RT) wrote:
> > Unfortunately, if you compile with g++8, this warning reappears.
> > op.c: In function ‘OP* S_fold_constants(OP*)’:
> > op.c:5468:34: warning: argument ‘o’ might be clobbered by ‘longjmp’ or 
> > ‘vfork’ [-Wclobbered]
> >   S_fold_constants(pTHX_ OP *const o)
> 
> In general I think our approach to the longjmp warnings should be
> to move the JMPENV_PUSH...JMPENV_POP block of code into its own
> small static function that does the barest minimum necessary to do the
> exception catching, and thus has very few local variables. It them becomes
> a lot more tractable to fix such warnings.
> 

Something like the attached?

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=133575

Thread Previous


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