pike.git/
src/
program.c
Branch:
Tag:
Non-build tags
All tags
No tags
2001-09-25
2001-09-25 07:36:40 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
2c9835a9c833a415a0eb2cb468f6580581155f69 (
10
lines) (+
9
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
prevent overloading variables with constants [bug
486 (#486)
]
Rev: src/program.c:1.374
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: program.c,v 1.
373
2001/09/25
05
:
55
:
12
hubbe Exp $");
+
RCSID("$Id: program.c,v 1.
374
2001/09/25
07
:
36
:
40
hubbe Exp $");
#include "program.h" #include "object.h" #include "dynamic_buffer.h"
3268:
if(IDENTIFIERP(n)->id_flags & ID_NOMASK) my_yyerror("Illegal to redefine 'nomask' identifier \"%s\"", name->str);
+
if(IDENTIFIER_IS_VARIABLE(ID_FROM_INT(Pike_compiler->new_program,
+
n)->identifier_flags))
+
{
+
my_yyerror("Illegal to redefine variable \"%s\" as constant.\n",
+
name->str);
+
}
+
/* not inherited */ if(Pike_compiler->new_program->identifier_references[n].inherit_offset == 0) {