develooper Front page | perl.perl5.porters | Postings from December 2011

[perl #34495] h2ph is unable to catenate constant strings in macros

From:
James E Keenan via RT
Date:
December 28, 2011 16:11
Subject:
[perl #34495] h2ph is unable to catenate constant strings in macros
Message ID:
rt-3.6.HEAD-14510-1325117506-792.34495-15-0@perl.org
On Sat Mar 19 09:59:21 2005, at@altlinux.ru wrote:
> This is a bug report for perl from aasdf,
> generated with the help of perlbug 1.35 running under perl v5.8.6.
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> 
> h2ph is unable to produce acceptible output for the following
>    construct:
> 
> $ cat cat.h
> #define STR \
>         "abc" \
>         "xyz"
> $ h2ph -d . cat.h
> cat.h -> cat.ph
> $ perl -c cat.ph
> syntax error at cat.ph line 6, near ""abc" "xyz""
> cat.ph had compilation errors.
> $ cat cat.ph
> require '_h2ph_pre.ph';
> 
> no warnings 'redefine';
> 
> unless(defined(&STR)) {
>     sub STR () {        "abc" "xyz";}
> }
> 1;
> $
> 

Trying this tonight with Perl 5.14.2 on Darwin/PPC, I got slightly
different output from 'h2ph -d . cat.h', but the result remains a file
that does not compile:

#####
require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&STR)) {
    sub STR () {    "abc" "xyz";}
}
1;
#####
$ perl -c cat.ph
syntax error at cat.ph line 6, near ""abc" "xyz""
cat.ph had compilation errors.
#####

Any ideas?

Thank you very much.
Jim Keenan

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



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