diff --git a/src/language.yacc b/src/language.yacc index f18e96ef81110ec6a0cd045474263f523a07bf6f..a802f9a4daa7f3f0ec8354c286258e1b2ba134fc 100644 --- a/src/language.yacc +++ b/src/language.yacc @@ -110,7 +110,7 @@ /* This is the grammar definition of Pike. */ #include "global.h" -RCSID("$Id: language.yacc,v 1.207 2000/08/16 16:02:08 grubba Exp $"); +RCSID("$Id: language.yacc,v 1.208 2000/08/18 22:05:40 grubba Exp $"); #ifdef HAVE_MEMORY_H #include <memory.h> #endif @@ -474,13 +474,14 @@ import: TOK_IMPORT idents ';' constant_name: TOK_IDENTIFIER '=' safe_expr0 { - ptrdiff_t tmp; /* This can be made more lenient in the future */ /* Ugly hack to make sure that $3 is optimized */ - tmp=Pike_compiler->compiler_pass; - $3=mknode(F_COMMA_EXPR,$3,0); - Pike_compiler->compiler_pass=tmp; + { + int tmp=Pike_compiler->compiler_pass; + $3=mknode(F_COMMA_EXPR,$3,0); + Pike_compiler->compiler_pass=tmp; + } if ((Pike_compiler->current_modifiers & ID_EXTERN) && (Pike_compiler->compiler_pass == 1)) { @@ -497,7 +498,7 @@ constant_name: TOK_IDENTIFIER '=' safe_expr0 } else { if(!Pike_compiler->num_parse_error) { - tmp=eval_low($3); + ptrdiff_t tmp=eval_low($3); if(tmp < 1) { yyerror("Error in constant definition.");