Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
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 CAST_INCLUDED
32
#define CAST_INCLUDED
33
 
34
 
35
/*
36
    TYPE CAST DECLARATIONS
37
 
38
    The routines in this module are concerned with casting types.
39
*/
40
 
41
extern EXP make_cast_exp PROTO_S ( ( TYPE, EXP, int ) ) ;
42
extern EXP make_static_cast_exp PROTO_S ( ( TYPE, EXP, int ) ) ;
43
extern EXP make_reinterp_cast_exp PROTO_S ( ( TYPE, EXP, int ) ) ;
44
extern EXP make_const_cast_exp PROTO_S ( ( TYPE, EXP, int ) ) ;
45
extern EXP make_new_cast_exp PROTO_S ( ( int, TYPE, EXP, int ) ) ;
46
extern EXP make_func_cast_exp PROTO_S ( ( TYPE, LIST ( EXP ) ) ) ;
47
extern EXP make_base_cast PROTO_S ( ( TYPE, EXP, OFFSET ) ) ;
48
 
49
extern EXP cast_exp PROTO_S ( ( TYPE, EXP, ERROR *, unsigned ) ) ;
50
extern EXP cast_int_int PROTO_S ( ( TYPE, EXP, ERROR *, unsigned, int ) ) ;
51
extern EXP cast_int_float PROTO_S ( ( TYPE, EXP, ERROR *, unsigned ) ) ;
52
extern EXP cast_float_float PROTO_S ( ( TYPE, EXP, ERROR *, unsigned ) ) ;
53
extern EXP cast_ptr_ptr PROTO_S ( ( TYPE, EXP, ERROR *, unsigned, int, int ) ) ;
54
extern EXP cast_ptr_mem_ptr_mem PROTO_S ( ( TYPE, EXP, ERROR *, unsigned, int, int ) ) ;
55
extern EXP cast_class_class PROTO_S ( ( TYPE, EXP, ERROR *, unsigned, int ) ) ;
56
extern EXP cast_templ_type PROTO_S ( ( TYPE, EXP, unsigned ) ) ;
57
extern void cast_away_const PROTO_S ( ( unsigned, ERROR *, unsigned ) ) ;
58
extern EXP cast_token PROTO_S ( ( TYPE, EXP, ERROR *, ERROR, unsigned ) ) ;
59
extern void allow_conversion PROTO_S ( ( IDENTIFIER ) ) ;
60
 
61
 
62
/*
63
    CAST IDENTIFIERS
64
 
65
    These values are used to identify the various classes of cast expressions
66
    in cast_exp and related routines.  They form a bitpattern for the static,
67
    reinterpret and const casts.
68
*/
69
 
70
#define CAST_IMPLICIT			( ( unsigned ) 0x00 )
71
#define CAST_STATIC			( ( unsigned ) 0x01 )
72
#define CAST_REINTERP			( ( unsigned ) 0x02 )
73
#define CAST_CONST			( ( unsigned ) 0x04 )
74
#define CAST_BAD			( ( unsigned ) 0x08 )
75
#define CAST_EXPLICIT			( ( unsigned ) 0x0f )
76
#define CAST_DYNAMIC			( ( unsigned ) 0x10 )
77
#define CAST_STANDARD			( ( unsigned ) 0x20 )
78
 
79
 
80
#endif