fixed memory fault, adapted mechanism code_scope
This commit is contained in:
@@ -382,11 +382,6 @@ code_declaration(idf, expr, lvl, sc)
|
||||
return;
|
||||
if (sc == EXTERN && expr && !is_anon_idf(idf))
|
||||
error("%s is extern; cannot initialize", idf->id_text);
|
||||
#ifndef PREPEND_SCOPES
|
||||
if (def->df_type->tp_fund == FUNCTION) {
|
||||
code_scope(idf->id_text, def);
|
||||
}
|
||||
#endif PREPEND_SCOPES
|
||||
if (lvl == L_GLOBAL) { /* global variable */
|
||||
/* is this an allocating declaration? */
|
||||
if ( (sc == 0 || sc == STATIC)
|
||||
@@ -429,9 +424,6 @@ code_declaration(idf, expr, lvl, sc)
|
||||
case GLOBAL:
|
||||
case IMPLICIT:
|
||||
/* we are sure there is no expression */
|
||||
#ifndef PREPEND_SCOPES
|
||||
code_scope(idf->id_text, def);
|
||||
#endif PREPEND_SCOPES
|
||||
break;
|
||||
case AUTO:
|
||||
case REGISTER:
|
||||
|
||||
Reference in New Issue
Block a user