2 |
7u83 |
1 |
/*
|
|
|
2 |
Crown Copyright (c) 1997
|
|
|
3 |
|
|
|
4 |
This TenDRA(r) Computer Program is subject to Copyright
|
|
|
5 |
owned by the United Kingdom Secretary of State for Defence
|
|
|
6 |
acting through the Defence Evaluation and Research Agency
|
|
|
7 |
(DERA). It is made available to Recipients with a
|
|
|
8 |
royalty-free licence for its use, reproduction, transfer
|
|
|
9 |
to other parties and amendment for any purpose not excluding
|
|
|
10 |
product development provided that any such use et cetera
|
|
|
11 |
shall be deemed to be acceptance of the following conditions:-
|
|
|
12 |
|
|
|
13 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
14 |
reproduced upon any copies or amended versions of it;
|
|
|
15 |
|
|
|
16 |
(2) Any amended version of it shall be clearly marked to
|
|
|
17 |
show both the nature of and the organisation responsible
|
|
|
18 |
for the relevant amendment or amendments;
|
|
|
19 |
|
|
|
20 |
(3) Its onward transfer from a recipient to another
|
|
|
21 |
party shall be deemed to be that party's acceptance of
|
|
|
22 |
these conditions;
|
|
|
23 |
|
|
|
24 |
(4) DERA gives no warranty or assurance as to its
|
|
|
25 |
quality or suitability for any purpose and DERA accepts
|
|
|
26 |
no liability whatsoever in relation to any use to which
|
|
|
27 |
it may be put.
|
|
|
28 |
*/
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
#ifndef BASETYPE_INCLUDED
|
|
|
32 |
#define BASETYPE_INCLUDED
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
/*
|
|
|
36 |
BASE TYPE DECLARATIONS
|
|
|
37 |
|
|
|
38 |
The routines in this module are concerned with the construction and
|
|
|
39 |
manipulation of the basic C and C++ types.
|
|
|
40 |
*/
|
|
|
41 |
|
|
|
42 |
extern void init_types PROTO_S ( ( void ) ) ;
|
|
|
43 |
extern TYPE make_base_type PROTO_S ( ( BASE_TYPE ) ) ;
|
|
|
44 |
extern BASE_TYPE join_pre_types PROTO_S ( ( BASE_TYPE, BASE_TYPE ) ) ;
|
|
|
45 |
extern TYPE complete_pre_type PROTO_S ( ( BASE_TYPE, TYPE, CV_SPEC, int ) ) ;
|
|
|
46 |
extern TYPE empty_complete_pre_type PROTO_S ( ( BASE_TYPE, TYPE, CV_SPEC, int ) ) ;
|
|
|
47 |
extern TYPE inject_pre_type PROTO_S ( ( TYPE, TYPE, int ) ) ;
|
|
|
48 |
extern TYPE copy_typedef PROTO_S ( ( IDENTIFIER, TYPE, CV_SPEC ) ) ;
|
|
|
49 |
extern TYPE qualify_type PROTO_S ( ( TYPE, CV_SPEC, int ) ) ;
|
|
|
50 |
extern TYPE lvalue_type PROTO_S ( ( TYPE ) ) ;
|
|
|
51 |
extern TYPE rvalue_type PROTO_S ( ( TYPE ) ) ;
|
|
|
52 |
extern TYPE check_bitfield_type PROTO_S ( ( CV_SPEC, TYPE, BASE_TYPE, NAT, int ) ) ;
|
|
|
53 |
extern BASE_TYPE get_bitfield_rep PROTO_S ( ( TYPE, BASE_TYPE ) ) ;
|
|
|
54 |
extern TYPE find_bitfield_type PROTO_S ( ( TYPE ) ) ;
|
|
|
55 |
extern TYPE make_bitfield_type PROTO_S ( ( TYPE, BASE_TYPE, EXP, int ) ) ;
|
|
|
56 |
extern int check_int_type PROTO_S ( ( TYPE, BASE_TYPE ) ) ;
|
|
|
57 |
extern ERROR report_inferred_type PROTO_S ( ( TYPE, int ) ) ;
|
|
|
58 |
extern TYPE clean_inferred_type PROTO_S ( ( TYPE ) ) ;
|
|
|
59 |
extern int is_type_inferred PROTO_S ( ( TYPE ) ) ;
|
|
|
60 |
extern NAT check_array_dim PROTO_S ( ( NAT ) ) ;
|
|
|
61 |
extern NAT make_array_dim PROTO_S ( ( EXP ) ) ;
|
|
|
62 |
extern void accept_argument PROTO_S ( ( TYPE, TYPE ) ) ;
|
|
|
63 |
extern void accept_ellipsis PROTO_S ( ( TYPE ) ) ;
|
|
|
64 |
extern TYPE eq_argument PROTO_S ( ( TYPE, TYPE, int ) ) ;
|
|
|
65 |
extern TYPE eq_ellipsis PROTO_S ( ( TYPE ) ) ;
|
|
|
66 |
extern void set_compatible_type PROTO_S ( ( TYPE, TYPE, unsigned ) ) ;
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
/*
|
|
|
70 |
BASE TYPES
|
|
|
71 |
|
|
|
72 |
These variables give the built-in C and C++ types.
|
|
|
73 |
*/
|
|
|
74 |
|
|
|
75 |
extern TYPE type_builtin [ ORDER_ntype ] ;
|
|
|
76 |
extern TYPE ptr_type_builtin [ ORDER_ntype ] ;
|
|
|
77 |
extern TYPE type_func_void ;
|
|
|
78 |
extern TYPE type_temp_func ;
|
|
|
79 |
extern TYPE type_ellipsis ;
|
|
|
80 |
extern TYPE type_error ;
|
|
|
81 |
|
|
|
82 |
#define type_inferred ( type_builtin [ ntype_none ] )
|
|
|
83 |
#define type_char ( type_builtin [ ntype_char ] )
|
|
|
84 |
#define type_schar ( type_builtin [ ntype_schar ] )
|
|
|
85 |
#define type_uchar ( type_builtin [ ntype_uchar ] )
|
|
|
86 |
#define type_sshort ( type_builtin [ ntype_sshort ] )
|
|
|
87 |
#define type_ushort ( type_builtin [ ntype_ushort ] )
|
|
|
88 |
#define type_sint ( type_builtin [ ntype_sint ] )
|
|
|
89 |
#define type_uint ( type_builtin [ ntype_uint ] )
|
|
|
90 |
#define type_slong ( type_builtin [ ntype_slong ] )
|
|
|
91 |
#define type_ulong ( type_builtin [ ntype_ulong ] )
|
|
|
92 |
#define type_sllong ( type_builtin [ ntype_sllong ] )
|
|
|
93 |
#define type_ullong ( type_builtin [ ntype_ullong ] )
|
|
|
94 |
#define type_float ( type_builtin [ ntype_float ] )
|
|
|
95 |
#define type_double ( type_builtin [ ntype_double ] )
|
|
|
96 |
#define type_ldouble ( type_builtin [ ntype_ldouble ] )
|
|
|
97 |
#define type_void ( type_builtin [ ntype_void ] )
|
|
|
98 |
#define type_bottom ( type_builtin [ ntype_bottom ] )
|
|
|
99 |
#define type_bool ( type_builtin [ ntype_bool ] )
|
|
|
100 |
#define type_ptrdiff_t ( type_builtin [ ntype_ptrdiff_t ] )
|
|
|
101 |
#define type_size_t ( type_builtin [ ntype_size_t ] )
|
|
|
102 |
#define type_wchar_t ( type_builtin [ ntype_wchar_t ] )
|
|
|
103 |
#define type_any ( type_builtin [ ntype_ellipsis ] )
|
|
|
104 |
|
|
|
105 |
#define type_temp_star ( ptr_type_builtin [ ntype_none ] )
|
|
|
106 |
#define type_char_star ( ptr_type_builtin [ ntype_char ] )
|
|
|
107 |
#define type_void_star ( ptr_type_builtin [ ntype_void ] )
|
|
|
108 |
|
|
|
109 |
|
|
|
110 |
/*
|
|
|
111 |
RETURN VALUES FOR INFERRED TYPES
|
|
|
112 |
|
|
|
113 |
These values are returned by is_type_inferred to describe the various
|
|
|
114 |
categories of inferred types.
|
|
|
115 |
*/
|
|
|
116 |
|
|
|
117 |
#define INFERRED_NOT 0
|
|
|
118 |
#define INFERRED_SPEC 1
|
|
|
119 |
#define INFERRED_QUAL 2
|
|
|
120 |
#define INFERRED_EMPTY 3
|
|
|
121 |
|
|
|
122 |
|
|
|
123 |
#endif
|