1989-02-07 11:04:05 +00:00
|
|
|
/*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
1994-06-27 08:03:14 +00:00
|
|
|
/* $Id$ */
|
1989-02-07 11:04:05 +00:00
|
|
|
/* IDENTIFIER DEFINITION DESCRIPTOR */
|
|
|
|
|
2013-05-12 19:45:55 +00:00
|
|
|
#include "parameters.h"
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
struct def { /* for ordinary tags */
|
|
|
|
struct def *next;
|
|
|
|
int df_level;
|
|
|
|
struct type *df_type;
|
|
|
|
int df_sc; /* may be:
|
1990-12-07 14:42:26 +00:00
|
|
|
GLOBAL, STATIC, EXTERN,
|
1989-02-07 11:04:05 +00:00
|
|
|
TYPEDEF,
|
|
|
|
FORMAL, AUTO,
|
|
|
|
ENUM, LABEL
|
|
|
|
*/
|
|
|
|
char df_initialized; /* an initialization has been generated */
|
|
|
|
char df_alloc; /* 0, ALLOC_SEEN or ALLOC_DONE */
|
|
|
|
char df_used; /* set if idf is used */
|
1990-12-19 17:32:04 +00:00
|
|
|
char df_formal_array; /* to warn if sizeof is taken */
|
1989-02-07 11:04:05 +00:00
|
|
|
char *df_file; /* file containing the definition */
|
|
|
|
unsigned int df_line; /* line number of the definition */
|
|
|
|
#ifdef LINT
|
|
|
|
char df_set;
|
|
|
|
int df_firstbrace; /* brace number of its first occurrence */
|
|
|
|
int df_minlevel; /* the lowest level needed for this def */
|
1991-12-17 13:12:22 +00:00
|
|
|
#endif /* LINT */
|
1989-02-07 11:04:05 +00:00
|
|
|
arith df_address;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define ALLOC_SEEN 1 /* an allocating declaration has been seen */
|
|
|
|
#define ALLOC_DONE 2 /* the allocating declaration has been done */
|
|
|
|
|
|
|
|
#define REG_DEFAULT 0 /* register candidate, not declared as such */
|
|
|
|
#define REG_BONUS 10 /* register candidate, declared as such */
|
|
|
|
|
|
|
|
/* ALLOCDEF "def" 50 */
|