Workaround for code generation bug in gcc-2.95.3
This commit is contained in:
parent
76585fb801
commit
7edecf980e
1 changed files with 9 additions and 1 deletions
|
@ -111,7 +111,15 @@ static naRef f_setValue(naContext c, naRef args)
|
|||
static naRef f_setIntValue(naContext c, naRef args)
|
||||
{
|
||||
NODEARG();
|
||||
int iv = (int)naNumValue(naVec_get(args, 0)).num;
|
||||
// Original code:
|
||||
// int iv = (int)naNumValue(naVec_get(args, 0)).num;
|
||||
|
||||
// Junk to pacify the gcc-2.95.3 optimizer:
|
||||
naRef tmp0 = naVec_get(args, 0);
|
||||
naRef tmp1 = naNumValue(tmp0);
|
||||
double tmp2 = tmp1.num;
|
||||
int iv = (int)tmp2;
|
||||
|
||||
(*node)->setIntValue(iv);
|
||||
return naNil();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue