1987-03-25 23:14:43 +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".
|
|
|
|
*/
|
1986-03-10 13:07:55 +00:00
|
|
|
/* $Header$ */
|
|
|
|
/* IDENTIFIER DEFINITION DESCRIPTOR */
|
|
|
|
|
1988-09-20 16:44:27 +00:00
|
|
|
#include "lint.h"
|
1988-08-19 13:55:22 +00:00
|
|
|
|
1986-03-10 13:07:55 +00:00
|
|
|
struct def { /* for ordinary tags */
|
|
|
|
struct def *next;
|
|
|
|
int df_level;
|
|
|
|
struct type *df_type;
|
|
|
|
int df_sc; /* may be:
|
|
|
|
GLOBAL, STATIC, EXTERN, IMPLICIT,
|
|
|
|
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 */
|
1988-08-29 15:51:48 +00:00
|
|
|
char *df_file; /* file containing the definition */
|
1988-09-16 23:19:50 +00:00
|
|
|
unsigned int df_line; /* line number of the definition */
|
1988-09-20 16:44:27 +00:00
|
|
|
#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 14:11:15 +00:00
|
|
|
#endif /* LINT */
|
1986-03-10 13:07:55 +00:00
|
|
|
char df_formal_array; /* to warn if sizeof is taken */
|
|
|
|
arith df_address;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define ALLOC_SEEN 1 /* an allocating declaration has been seen */
|
|
|
|
#define ALLOC_DONE 2 /* the allocating declaration has been done */
|
|
|
|
|
1987-07-16 13:27:37 +00:00
|
|
|
#define REG_DEFAULT 0 /* register candidate, not declared as such */
|
1986-03-10 13:07:55 +00:00
|
|
|
#define REG_BONUS 10 /* register candidate, declared as such */
|
|
|
|
|
1987-01-24 00:25:56 +00:00
|
|
|
/* ALLOCDEF "def" 50 */
|