On Sat Mar 19 09:59:22 2005, at@altlinux.ru wrote:
> This is a bug report for perl from at@solemn.turbinal.org,
> generated with the help of perlbug 1.35 running under perl v5.8.6.
>
> Again, I know h2ph is a rough tool that doesn't handle all C
> constructs.
> This is the last bug report for today. :)
>
> $ cat while0.h
> #define NOOP \
> do { \
> int x = 1 + 1; \
> } while (0)
> $ h2ph -d . while0.h
> while0.h -> while0.ph
> $ perl -c while0.ph
> syntax error at while0.ph line 6, near "&do { "
> syntax error at while0.ph line 7, near "}"
> while0.ph had compilation errors.
> $ cat while0.ph
> require '_h2ph_pre.ph';
>
> no warnings 'redefine';
>
> unless(defined(&NOOP)) {
> sub NOOP () { &do { 'int' &x = 1+ 1; } &while (0);}
> }
> 1;
> $
>
Trying this today with Perl 5.14.2 on Darwin/PPC, I get better results:
#####
$ h2ph -d . while0.h
while0.h -> while0.ph
$ cat while0.ph
require '_h2ph_pre.ph';
no warnings qw(redefine misc);
unless(defined(&NOOP)) {
sub NOOP () { 1;}
}
1;
$ perl -c while0.ph
while0.ph syntax OK
#####
If so, can we close this ticket?
Thank you very much.
Jim Keenan
---
via perlbug: queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=34496