summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2009-12-01 19:12:30 +1100
committerH.Merijn Brand <h.m.brand@xs4all.nl>2009-12-01 10:09:07 +0100
commit5ca68648d92617d8e0deebbc877c24f91be5ce4d (patch)
treed092c8d12d71ecd00ac72041a526793db4ec9f9d
parent9d5fa2fef2f7498beeacbefa90966b9242a6fab5 (diff)
downloadperl-5ca68648d92617d8e0deebbc877c24f91be5ce4d.tar.gz
-Dmad broken for c++
On Tue, Dec 01, 2009 at 08:22:38AM +0100, H.Merijn Brand wrote: > perly.y: In function 'int Perl_madparse(PerlInterpreter*)': > perly.y:335: error: cast from 'TOKEN*' to 'line_t' loses precision > perly.y:348: error: cast from 'TOKEN*' to 'line_t' loses precision > perly.y:430: error: cast from 'TOKEN*' to 'line_t' loses precision Uses the same mechanism used in if, unless to retrieve an ival set in toke.c Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
-rw-r--r--perly.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/perly.y b/perly.y
index 4e9908e3da..18e58758fb 100644
--- a/perly.y
+++ b/perly.y
@@ -332,7 +332,7 @@ cont : /* NULL */
/* Loops: while, until, for, and a bare block */
loop : label WHILE '(' remember texpr ')' mintro mblock cont
{ OP *innerop;
- PL_parser->copline = (line_t)$2;
+ PL_parser->copline = (line_t)IVAL($2);
$$ = block_end($4,
newSTATEOP(0, PVAL($1),
innerop = newWHILEOP(0, 1, (LOOP*)(OP*)NULL,
@@ -345,7 +345,7 @@ loop : label WHILE '(' remember texpr ')' mintro mblock cont
| label UNTIL '(' remember iexpr ')' mintro mblock cont
{ OP *innerop;
- PL_parser->copline = (line_t)$2;
+ PL_parser->copline = (line_t)IVAL($2);
$$ = block_end($4,
newSTATEOP(0, PVAL($1),
innerop = newWHILEOP(0, 1, (LOOP*)(OP*)NULL,
@@ -427,7 +427,7 @@ loop : label WHILE '(' remember texpr ')' mintro mblock cont
/* Switch blocks */
switch : label GIVEN '(' remember mydefsv mexpr ')' mblock
- { PL_parser->copline = (line_t) $2;
+ { PL_parser->copline = (line_t) IVAL($2);
$$ = block_end($4,
newSTATEOP(0, PVAL($1),
newGIVENOP($6, scope($8),