Lindseys fix to a bug with nested procedures

This commit is contained in:
ceriel 1987-03-09 10:15:51 +00:00
parent 539c95237e
commit fa0f6cd0c6
3 changed files with 9 additions and 5 deletions

View file

@ -32,10 +32,12 @@ static char rcsid[] = "$Header$";
* Author: Hans van Staveren
*/
#define local(x) if (((x)->s_flags&SYMKNOWN) == 0)\
x->s_flags &= ~ SYMGLOBAL
#define global(x) if(((x)->s_flags&SYMKNOWN) == 0)\
x->s_flags |= SYMGLOBAL
#define local(x) ((((x)->s_flags&SYMKNOWN) == 0 && \
((x)->s_flags &= ~ SYMGLOBAL)),\
(x)->s_flags |= SYMSEEN)
#define global(x) ((((x)->s_flags&SYMKNOWN) == 0 && \
((x)->s_flags |= SYMGLOBAL)), \
(x)->s_flags |= SYMSEEN)
#define DTYPHOL 1
#define DTYPBSS 2

View file

@ -17,6 +17,7 @@ struct sym {
#define SYMKNOWN 000004
#define SYMOUT 000010
#define SYMDEF 000020
#define SYMSEEN 000040
#define NSYMHASH 127
extern sym_p symhash[NSYMHASH],symlookup();

View file

@ -93,6 +93,7 @@ symknown() {
for (spp = symhash; spp < &symhash[NSYMHASH]; spp++)
for (sp = *spp; sp != (sym_p) 0; sp = sp->s_next)
if (sp->s_flags & SYMSEEN)
sp->s_flags |= SYMKNOWN;
}