-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCompiler.h
More file actions
57 lines (35 loc) · 2.24 KB
/
Compiler.h
File metadata and controls
57 lines (35 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef COMPILER_H_
#define COMPILER_H_
#include "Compiler_Cfg.h"
#define AUTOMATIC /* used as input for memory class (memclass) and pointer class (ptrclass) when no
input from Compiler_Cfg.h is needed */
#define TYPEDEF /* used with typedef keyword in as input for memory class (of compiler)because with
typedef we cannot use them */
#define NULL_PTR ((void*) 0x0)
#define INLINE inline
#define LOCAL_INLINE static inline
/* 8.2.2 function definition use it to define functions */
#define FUNC( rettype, memclass ) rettype /* for the declaration
and definition of functions */
#define FUNC_P2CONST(rettype, ptrclass, memclass) const rettype * /* declaration and definition
of functions returning a pointer to a constant */
#define FUNC_P2VAR(rettype, ptrclass, memclass) rettype * /* for the declaration and definition
of functions returning a pointer to a variable */
/* 8.2.3 Pointer definitions use it to define pointers */
#define P2VAR(ptrtype, memclass, ptrclass) ptrtype * /* for the declaration and
definition of pointers in RAM, pointing to variables */
#define P2CONST(ptrtype, memclass, ptrclass) const ptrtype* /* for the declaration and
definition of pointers in RAM pointing to constants */
#define CONSTP2VAR(ptrtype, memclass, ptrclass) ptrtype * const /* for the declaration and
definition of constant pointers accessing variables */
#define CONSTP2CONST(ptrtype, memclass, ptrclass) const ptrtype * const /* for the declaration and
definition of constant pointers accessing constants */
#define P2FUNC(rettype, ptrclass, fctname) rettype (* fctname) /* for the type definition of
pointers to functions (fctname is pointer to function name)*/
#define CONSTP2FUNC(rettype, ptrclass, fctname) rettype (* const fctname) /* the type definition of
constant pointers to functions */ /* fctname is pointer to function name*/
/* 8.2.4 Constant definitions use it to define Constants */
#define CONST(type, memclass) const type /* for the declaration and definition of constants */
/* 8.2.4 Variable definitions use it to define Variables */
#define VAR( type, memclass ) type /* for the declaration and definition of constants */
#endif