Closed eserte closed 2 years ago
On 3/12/22 00:03, Slaven Rezić wrote:
Just a guess: maybe the variable shouldn't be named |new| as this possibly clashes with a C++ keyword?
That sounds fairly likely. Is it easy for you to try your hypothesis out?
In any event, 'new' was a poor choice of variable name and should be changed, but it would be nice to know if that is what is causing this problem before we release a new version
Tried the following diff:
diff --git i/PPPort.pm w/PPPort.pm
index a5fb62b..b1feae6 100644
--- i/PPPort.pm
+++ w/PPPort.pm
@@ -20008,17 +20008,17 @@ DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...)
# if defined(PERL_USE_GCC_BRACE_GROUPS)
# define newSVsv_flags(sv, flags) \
({ \
- SV *new = newSV(0); \
- sv_setsv_flags(new, (sv), (flags)); \
- new; \
+ SV *n = newSV(0); \
+ sv_setsv_flags(n, (sv), (flags)); \
+ n; \
})
# else
PERL_STATIC_INLINE SV* D_PPP_newSVsv_flags(SV *const old, I32 flags)
{
dTHX;
- SV *new = newSV(0);
- sv_setsv_flags(new, old, flags);
- return new;
+ SV *n = newSV(0);
+ sv_setsv_flags(n, old, flags);
+ return n;
}
# define newSVsv_flags(sv, flags) D_PPP_newSVsv_flags(sv, flags)
# endif
Compiler-Lexer compilation was then successful with perl 5.28.0.
For some perl versions (< 5.30.0?) the compilation of Compiler-Lexer-0.23 started to fail like this:
Just a guess: maybe the variable shouldn't be named
new
as this possibly clashes with a C++ keyword?