Front page | perl.perl5.porters |
Postings from August 2010
Re: Compiling with clang
Thread Previous
|
Thread Next
From:
Ævar Arnfjörð Bjarmason
Date:
August 9, 2010 07:27
Subject:
Re: Compiling with clang
Message ID:
AANLkTi=fCO90Oo6Gt98uNvG=sNA_+3tX_cbyMuh=9d0r@mail.gmail.com
On Mon, Aug 9, 2010 at 13:55, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> On Thu, May 6, 2010 at 16:10, <hv@crypt.org> wrote:
>> I tried compiling bleadperl with clang (<http://clang.llvm.org>), which
>> has nicely picky, verbose error messages.
>>
>> I fetch clang direct from svn. clang --version initially gave
>> 'clang version 2.0 (trunk 102861)', and later (after (5) below) as
>> 'clang version 2.0 (trunk 103176)'. gccversion comes out as
>> 'GNU cc 4.2.1 Compatible Clang Compiler'.
>
> Here's an update 3 months later on building perl with clang from SVN:
And here's the stuff it's now warning on:
1. make 2>/tmp/clang-err.txt
2. ack -A2 ': warning: (?!.*unused)' /tmp/clang-err.txt
sv.c:903:29: warning: comparison of 0 <= unsigned expression is always
true [-Wsign-compare]
FALSE, NONV, NOARENA, FIT_ARENA(0, sizeof(HE)) },
^~~~~~~~~~~~~~~~~~~~~~~~
--
sv.c:920:39: warning: comparison of 0 <= unsigned expression is always
true [-Wsign-compare]
SVt_NV, FALSE, HADNV, HASARENA, FIT_ARENA(0, sizeof(NV)) },
^~~~~~~~~~~~~~~~~~~~~~~~
--
sv.c:942:7: warning: comparison of 0 <= unsigned expression is always
true [-Wsign-compare]
FIT_ARENA(0, sizeof(XPVIV)) },
^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
sv.c:955:17: warning: comparison of 0 <= unsigned expression is always
true [-Wsign-compare]
HASARENA, FIT_ARENA(0, sizeof(XPVNV)) },
^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
sv.c:960:17: warning: comparison of 0 <= unsigned expression is always
true [-Wsign-compare]
HASARENA, FIT_ARENA(0, sizeof(XPVMG)) },
^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
sv.c:972:17: warning: comparison of 0 <= unsigned expression is always
true [-Wsign-compare]
HASARENA, FIT_ARENA(0, sizeof(XPVGV)) },
^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
sv.c:976:17: warning: comparison of 0 <= unsigned expression is always
true [-Wsign-compare]
HASARENA, FIT_ARENA(0, sizeof(XPVLV)) },
^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
sv.c:982:7: warning: comparison of 0 <= unsigned expression is always
true [-Wsign-compare]
FIT_ARENA(0, sizeof(XPVAV)) },
^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
sv.c:988:7: warning: comparison of 0 <= unsigned expression is always
true [-Wsign-compare]
FIT_ARENA(0, sizeof(XPVHV)) },
^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
sv.c:995:7: warning: comparison of 0 <= unsigned expression is always
true [-Wsign-compare]
FIT_ARENA(0, sizeof(XPVCV)) },
^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
pp_sys.c:1653:10: warning: passing 'int *' to parameter of type
'socklen_t *' (aka 'unsigned int *') converts between pointers to
integer types with different sign [-Wpointer-sign]
count = PerlSock_recvfrom(PerlIO_fileno(IoIFP(io)), buffer,
length, offset,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
pp_sys.c:2607:10: warning: passing 'int *' to parameter of type
'socklen_t *' (aka 'unsigned int *') converts between pointers to
integer types with different sign [-Wpointer-sign]
fd = PerlSock_accept(PerlIO_fileno(IoIFP(gstio)), (struct sockaddr
*) namebuf, &len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
pp_sys.c:2708:6: warning: passing 'int *' to parameter of type
'socklen_t *' (aka 'unsigned int *') converts between pointers to
integer types with different sign [-Wpointer-sign]
if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
pp_sys.c:2783:6: warning: passing 'int *' to parameter of type
'socklen_t *' (aka 'unsigned int *') converts between pointers to
integer types with different sign [-Wpointer-sign]
if (PerlSock_getsockname(fd, (struct sockaddr *)SvPVX(sv), &len) < 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
pp_sys.c:2787:6: warning: passing 'int *' to parameter of type
'socklen_t *' (aka 'unsigned int *') converts between pointers to
integer types with different sign [-Wpointer-sign]
if (PerlSock_getpeername(fd, (struct sockaddr *)SvPVX(sv), &len) < 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
doio.c:581:11: warning: passing 'int *' to parameter of type
'socklen_t *' (aka 'unsigned int *') converts between pointers to
integer types with different sign [-Wpointer-sign]
if (PerlSock_getsockname(fd, (struct sockaddr *)tmpbuf,
&buflen) >= 0
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
perlio.c:5324:21: warning: comparison of integers of different signs:
'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
const int val = my_vsnprintf(s, n > 0 ? n : 0, fmt, ap);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
Dumper.xs:813:37: warning: conversion specifies type 'long' but the
argument has type 'U32' (aka 'unsigned int') [-Wformat]
warn("cannot handle ref type %ld", realtype);
~~^ ~~~~~~~~
--
Call.xs:62:58: warning: conversion specifies type 'int' but the
argument has type 'STRLEN' (aka 'unsigned long') [-Wformat]
warn("**** In filter_call - maxlen = %d, out len buf = %d idx
= %d my_sv = %d [%s]\n",
~^
--
Call.xs:62:78: warning: conversion specifies type 'int' but the
argument has type 'STRLEN' (aka 'unsigned long') [-Wformat]
warn("**** In filter_call - maxlen = %d, out len buf = %d idx
= %d my_sv = %d [%s]\n",
~^
--
Call.xs:99:53: warning: conversion specifies type 'int' but the
argument has type 'STRLEN' (aka 'unsigned long') [-Wformat]
warn("recycle %d - leaving %d, returning %d [%s]",
~^
--
Call.xs:155:46: warning: conversion specifies type 'int' but the
argument has type 'STRLEN' (aka 'unsigned long') [-Wformat]
warn("status = %d, length op buf = %d [%s]\n",
~^
--
Call.xs:174:57: warning: conversion specifies type 'int' but the
argument has type 'STRLEN' (aka 'unsigned long') [-Wformat]
warn ("filter_read %d returned %d , returning %d\n", idx, n,
~^
--
FieldHash.xs:128:20: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
while (ent = hv_iternext(field_tab)) {
~~~~^~~~~~~~~~~~~
--
FieldHash.xs:165:13: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
if (ent = hv_fetch_ent(MY_CXT.ob_reg, ob_id, 0, 0))
~~~~^~~~~~~~~~~~~~
--
FieldHash.xs:216:26: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
if ( trigger = HUF_ask_trigger(keysv))
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
--
FieldHash.xs:285:16: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
while (ent = hv_iternext(field_tab)) {
~~~~^~~~~~~~~~~~~
--
FieldHash.xs:293:17: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
if (val = hv_delete_ent(field, old_id, 0, 0))
~~~~^~~~~~~~~~~~~~~
--
FieldHash.xs:310:15: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
while(ent = hv_iternext(MY_CXT.ob_reg))
~~~~^~~~~~~~~~~~~
--
FieldHash.xs:438:24: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
while (ent = hv_iternext(field_tab)) {
~~~~^~~~~~~~~~~~~
--
Storable.xs:4140:2: warning: null passed to a callee which requires a
non-null argument [-Wnonnull]
SEEN(sv, 0, 0);
/* Don't bless yet */
^~~~~~~~~~~~~~
--
Storable.xs:5532:2: warning: null passed to a callee which requires a
non-null argument [-Wnonnull]
SEEN(av, 0, 0); /* Will return if
array not allocated nicely */
^~~~~~~~~~~~~~
--
Storable.xs:5594:2: warning: null passed to a callee which requires a
non-null argument [-Wnonnull]
SEEN(hv, 0, 0); /* Will return if table not
allocated properly */
^~~~~~~~~~~~~~
--
APItest.c:1275:2: warning: 'Perl_ptr_table_clear' is deprecated
[-Wdeprecated-declarations]
ptr_table_clear(table);
^
Thread Previous
|
Thread Next