A strange compiling issue
Unga
unga888 at yahoo.com
Tue Sep 23 09:45:41 UTC 2008
Hi
I'm trying to compile Perl on FreeBSD. It get cleanly compiled on FreeBSD 7.0.
But on another test system running RELENG_7 where I do weired things, it develops errors. There must be something wrong with my test system, I would like to understand what cause this error.
cc -c -DPERL_CORE -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -std=c89 -O -Wall -ansi -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat toke.c
toke.c: In function 'Perl_yylex':
toke.c:6633: error: lvalue required as unary '&' operand
toke.c:6633: error: lvalue required as unary '&' operand
toke.c: In function 'S_pending_ident':
toke.c:6923: error: lvalue required as unary '&' operand
toke.c:6923: error: lvalue required as unary '&' operand
toke.c: In function 'S_scan_heredoc':
toke.c:11182: error: invalid operands to binary + (have 'char *' and 'char *')
toke.c:11182: error: lvalue required as unary '&' operand
toke.c:11182: error: lvalue required as unary '&' operand
toke.c: In function 'S_scan_formline':
toke.c:12321: error: invalid operands to binary + (have 'char *' and 'char *')
toke.c:12321: error: lvalue required as unary '&' operand
toke.c:12321: error: lvalue required as unary '&' operand
Line 6633:
if (memchr(tmpbuf, ':', len))
sv_setpvn(PL_subname, tmpbuf, len);
else {
sv_setsv(PL_subname,PL_curstname);
sv_catpvs(PL_subname,"::");
sv_catpvn(PL_subname,tmpbuf,len);
}
Line 6923:
const char *const has_colon = (const char*) memchr (PL_tokenbuf, ':', tokenbuf_len);
Please note, on test programs memchr works correctly.
Appreciate your reply.
Kind regards
Unga
More information about the freebsd-questions
mailing list