Subject: | Solaris with Sun Workshop: heavy cosmetic issue |
Date: | Sat, 18 Jun 2011 21:48:49 +0400 |
To: | <bug-PAR-Packer [...] rt.cpan.org> |
From: | Alexander Tokarev <nohuhu [...] nohuhu.org> |
Hi PAR::Packer maintainers,
I was trying to build PAR::Packer 1.009 with Sun Workshop C Compiler I
believe it's version 12 and encountered a bug that is, while being purely
cosmetic, is nevertheless seriously annoying. The culprit is C code
generated by myldr/file2c.pl on line 76:
print $out "const char ${c_var}${suffix}[] = ";
The resulting C code produces warnings like this:
"my_libperl.c", line 8: warning: initializer does not fit or is out of
range: 155
The problem is that C compiler warns literally on every line of the compiled
my_libperl.c and my_par.c. Considering that I'm working remotely on a slow
system, and my_libperl.c and my_par.c combined total to 38 mb of code, you
can see why I didn't have the patience to wait till it builds
The fix is really easy: either change "const char" to "const unsigned char"
or add "-w" parameter to cc command line. I did that and PAR::Packer
finished building in like five minutes instead of previously unfinished
three hours.
Hope you will approve this patch, it may save lots of frustration to fellow
Solaris users.
Regards,
Alex.