Subject: | Warnings in .../perl/lib/CORE/perl.h (when using -Wall) |
Hi,
during my research with Image::Magick I have came across the following
issue concerning C:/strawberry/perl/lib/CORE/perl.h
The problem occurs when module tries to '#include "perl.h"' (all XS do
that) and sets '-Wall' in its CCFLAGS as for example Image::Magick -
then you will experience the following warnings:
##########
...
In file included from C:/strawberry/perl/lib/CORE/perl.h:38,
from Magick.xs:61:
C:/strawberry/perl/lib/CORE/config.h:39:20: warning: "/*" within comment
C:/strawberry/perl/lib/CORE/config.h:45:21: warning: "/*" within comment
+ many many similar
...
##########
The reason is that in config.h there are blocks like this:
/* HAS_FORK:
* This symbol, if defined, indicates that the fork routine is
* available.
*/
/*#define HAS_FORK /**/
And as you can see the line with "#define HAS_FORK" obviously has some
extra '/*' causing the warnings.
I am afraid that config.h comes from Perl core and I have no idea why
they use this style of comments.
The thing I do not understand is why haven't I seen something like this
earlier - it is probably very rare to use "CCFLAGS => '-Wall'" in
Makefile.pl.
I can of course post an RT to Perl::Magick proposing removal of -Wall
from their Makefile.pl but a systematic solution would IMHO be to fix
config.h in strawberry perl.
Anyway the priority is very low.
--
kmx