On Sat Mar 19 09:59:21 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. > > I know that h2ph hardly ever will become perfect, but I am to report > that > h2ph cannot produce acceptable output for the following construct > (found > in Linux kernel headers): > > $ cat scx200_gpio.h > #define __SCx200_GPIO_BANK unsigned bank = index>>5 > $ h2ph -d . scx200_gpio.h > scx200_gpio.h -> scx200_gpio.ph > $ perl -c scx200_gpio.ph > Can't modify constant item in scalar assignment at scx200_gpio.ph line > 6, near "5;" > scx200_gpio.ph had compilation errors. > $ cat scx200_gpio.ph > require '_h2ph_pre.ph'; > > no warnings 'redefine'; > > unless(defined(&__SCx200_GPIO_BANK)) { > sub __SCx200_GPIO_BANK () { 'unsigned bank' = &index>>5;} > } > 1; > $ > Examining this tonight using Perl 5.14.2 on Darwin/PPC, I got slightly different output from the original poster, but still got a Perl file that will not compile: ##### $ h2ph -d . scx200_gpio.h scx200_gpio.h -> scx200_gpio.ph $ perl -c scx200_gpio.ph Can't modify constant item in scalar assignment at scx200_gpio.ph line 6, near "5;" scx200_gpio.ph had compilation errors. $ cat scx200_gpio.ph require '_h2ph_pre.ph'; ##### Any ideas? Thank you very much. Jim Keenan no warnings qw(redefine misc); unless(defined(&__SCx200_GPIO_BANK)) { sub __SCx200_GPIO_BANK () { 'unsigned bank' = &index>>5;} } 1; --- via perlbug: queue: perl5 status: new https://rt.perl.org:443/rt3/Ticket/Display.html?id=34497