Thread: plperl warning

plperl warning

From
Bruce Momjian
Date:
I am seeing this compile warning in plperl:
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -fno-strict-aliasing-O1 -Wall -Wmissing-prototypes
-Wmissing-declarations-Wpointer-arith-Wcast-align -fpic -I. -I../../../src/include-I/usr/local/include/readline
-I/usr/contrib/include-I/usr/libdata/perl5/5.00503/i386-bsdos/CORE -c -o plperl.o plperl.cplperl.c: In function
`plperl_spi_query':plperl.c:1622:warning: passing arg 1 of `Perl_newSVpv' discardsqualifiers from pointer target type
 

Is anyone else seeing this?  This is with:
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


Re: plperl warning

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I am seeing this compile warning in plperl:
>     plperl.c:1622: warning: passing arg 1 of `Perl_newSVpv' discards
>     qualifiers from pointer target type

> Is anyone else seeing this?  This is with:

>     Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:

No, because we're all using less obsolete Perls ;-).  Evidently they
added the const qualifier to newSVpv's declaration since then.
        regards, tom lane


Re: plperl warning

From
Andrew Dunstan
Date:
I am not seeing it on FC4/perl5.8.6:


make[3]: Entering directory `/home/andrew/pg/pgsql/src/pl/plperl'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith 
-Wdeclaration-after-statement -Wold-style-definition -Wendif-labels 
-fno-strict-aliasing -g -fpic -I. -I../../../src/include -D_GNU_SOURCE  
-I/usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE  -c -o plperl.o plperl.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith 
-Wdeclaration-after-statement -Wold-style-definition -Wendif-labels 
-fno-strict-aliasing -g -fpic -I. -I../../../src/include -D_GNU_SOURCE  
-I/usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE  -c -o 
spi_internal.o spi_internal.c
"/usr/bin/perl" /usr/lib/perl5/5.8.6/ExtUtils/xsubpp -typemap 
/usr/lib/perl5/5.8.6/ExtUtils/typemap SPI.xs >SPI.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith 
-Wdeclaration-after-statement -Wold-style-definition -Wendif-labels 
-fno-strict-aliasing -g -fpic -I. -I../../../src/include -D_GNU_SOURCE  
-I/usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE  -c -o SPI.o SPI.c
ar crs libplperl.a plperl.o spi_internal.o SPI.o
ranlib libplperl.a
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith 
-Wdeclaration-after-statement -Wold-style-definition -Wendif-labels 
-fno-strict-aliasing -g -fpic -shared -Wl,-soname,libplperl.so.0  
plperl.o spi_internal.o SPI.o -L../../../src/port -L/usr/local/lib 
/usr/lib/perl5/5.8.6/i386-linux-thread-multi/auto/DynaLoader/DynaLoader.a 
-L/usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE -lperl -lresolv 
-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc  
-Wl,-rpath,/usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE -o 
libplperl.so.0.0
rm -f libplperl.so.0
ln -s libplperl.so.0.0 libplperl.so.0
rm -f libplperl.so
ln -s libplperl.so.0.0 libplperl.so



Perl 5.6 was released more than 5 years ago now, I think that we could 
reasonably say that it is the minumum version we support.

OTOH:
. I am seeing LOTS of warnings (not for plperl) about mismatched 
signedness of things
. David Fetter has shown me another plperl warning (this time at 
runtime) that I'm on the track of

cheers

andrew


Bruce Momjian wrote:

>I am seeing this compile warning in plperl:
>
>    gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -fno-strict-aliasing
>    -O1 -Wall -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith
>    -Wcast-align -fpic -I. -I../../../src/include
>    -I/usr/local/include/readline -I/usr/contrib/include
>    -I/usr/libdata/perl5/5.00503/i386-bsdos/CORE  -c -o plperl.o plperl.c
>    plperl.c: In function `plperl_spi_query':
>    
>    plperl.c:1622: warning: passing arg 1 of `Perl_newSVpv' discards
>    qualifiers from pointer target type
>
>Is anyone else seeing this?  This is with:
>
>    Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
>
>  
>


Re: plperl warning

From
Tom Lane
Date:
Andrew Dunstan <andrew@dunslane.net> writes:
> . I am seeing LOTS of warnings (not for plperl) about mismatched 
> signedness of things

Yeah, the multibyte code is just full of places where "char *" is passed
to "unsigned char *" or vice versa.  It's harmless, but on compilers
that warn about that (which includes the latest gcc releases) it's
pretty annoying.  Sometime we'll have to clean it up.
        regards, tom lane