2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
5 /* $Id: type.str,v 1.11 1994/06/27 08:03:10 ceriel Exp $ */
8 #include "nobitfield.h"
12 struct type *next; /* used for ARRAY and for qualifiers */
13 short tp_fund; /* fundamental type */
15 char tp_typequal; /* type qualifier */
17 arith tp_size; /* -1 if declared but not defined */
18 struct type *tp_pointer; /* to POINTER */
19 struct type *tp_array; /* to ARRAY */
24 /* This field is not needed now; see comment in function_of() routine. */
25 struct type *tp_function; /* to FUNCTION */
29 struct idf *tp__idf; /* name of STRUCT, UNION or ENUM */
30 struct sdef *tp__sdef; /* to first selector */
31 } tp_istagged; /* used with STRUCT, UNION & ENUM */
33 /* tp__up: from FIELD, POINTER, ARRAY or FUNCTION to fund. */
36 arith tp__nel; /* # of elements for array */
37 /* tp__field: field descriptor if fund == FIELD */
38 struct field *tp__field;
40 /* prototype list (pseudoproto for old_style def) */
41 struct proto *tp__proto;
42 struct proto *tp__pseudoproto;
44 } tp_f; /* FIELD or FUNCTION */
45 } tp_nottagged; /* used with POINTER, FIELD, ARRAY & FUNCTION */
49 #define tp_idf tp_union.tp_istagged.tp__idf
50 #define tp_sdef tp_union.tp_istagged.tp__sdef
51 #define tp_up tp_union.tp_nottagged.tp__up
52 #define tp_field tp_union.tp_nottagged.tp_f.tp__field
53 #define tp_nel tp_union.tp_nottagged.tp_f.tp__nel
54 #define tp_proto tp_union.tp_nottagged.tp_f.tp_isfunc.tp__proto
55 #define tp_pseudoproto tp_union.tp_nottagged.tp_f.tp_isfunc.tp__pseudoproto
57 /* Type qualifiers. Note: TQ_VOLATILE and TQ_CONST can be
58 'ored' to specify: extern const volatile int a;
60 #define TQ_VOLATILE 0x01
64 *create_type(), *standard_type(), *construct_type(), *pointer_to(),
65 *array_of(), *function_of(), *promoted_type();
68 extern struct type *field_of();
69 #endif /* NOBITFIELD */
72 *schar_type, *uchar_type,
73 *short_type, *ushort_type,
74 *word_type, *uword_type,
75 *int_type, *uint_type,
76 *long_type, *ulong_type,
77 *float_type, *double_type, *lngdbl_type,
79 *string_type, *funint_type, *error_type;
81 extern struct type *pa_type; /* type.c */
83 extern arith size_of_type(), align();
85 /* ALLOCDEF "type" 50 */