Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 82677
Status: resolved
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: CHORNY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 804.030
Fixed in: 804.031



Subject: compilation fails on 5.17.7
perl 5.17.7, no ithreads. With perl 5.10.1 I had only a test error in t/entry.t. Linux, gcc version 4.6.3 /home/chorny/perl5/perlbrew/perls/perl-5.17.7/bin/perl5.17.7 /home/chorny/perl5/perlbrew/perls/perl-5.17.7/lib/5.17.7/ExtUtils/xsubpp -typemap /home/chorny/perl5/perlbrew/perls/perl-5.17.7/lib/5.17.7/ExtUtils/typemap -typemap /home/chorny/.cpan/build/Tk-804.030-_ergtT/Tk/typemap IO.xs > IO.xsc && mv IO.xsc IO.c Warning: Found a 'CODE' section which seems to be using 'RETVAL' but no 'OUTPUT' section. in IO.xs, line 235 cc -c -I.. -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"804.03\" -DXS_VERSION=\"804.03\" -fPIC "-I/home/chorny/perl5/perlbrew/perls/perl-5.17.7/lib/5.17.7/i686-linux/CORE" -Wall -Wno-implicit-int -Wno-comment -Wno-unused -D__USE_FIXED_PROTOTYPES__ IO.c IO.xs: In function ‘XS_Tk__IO_read’: IO.xs:210:6: error: invalid use of void expression make[1]: *** [IO.o] Error 1 -- Alexandr Ciornii, http://chorny.net
From the release notes for 5.17.7: SvUPGRADE() is no longer an expression. Originally this macro (and its underlying function, sv_upgrade()) were documented as boolean, although in reality they always croaked on error and never returned false. In 2005 the documentation was updated to specify a void return value, but SvUPGRADE() was left always returning 1 for backwards compatibility. This has now been removed, and SvUPGRADE() is now a statement with no return value. So this is now a syntax error: if (!SvUPGRADE(sv)) { croak(...); } If you have code like that, simply replace it with SvUPGRADE(sv); or to to avoid compiler warnings with older perls, possibly (void)SvUPGRADE(sv);
On 2013-02-03 13:54:42, ikegami wrote: Show quoted text
> From the release notes for 5.17.7: > > SvUPGRADE() is no longer an expression. Originally this macro (and its > underlying function, sv_upgrade()) were documented as boolean, although > in reality they always croaked on error and never returned false. In 2005 > the documentation was updated to specify a void return value, but > SvUPGRADE() was left always returning 1 for backwards compatibility. This > has now been removed, and SvUPGRADE() is now a statement with no return > value. > > So this is now a syntax error: > > if (!SvUPGRADE(sv)) { croak(...); } > > If you have code like that, simply replace it with > > SvUPGRADE(sv); > > or to to avoid compiler warnings with older perls, possibly > > (void)SvUPGRADE(sv); >
This was fixed in commit 2333fa35c99aae1db1cb8d3ebce31fc21bc66e0a. Regards, Slaven