]> rtime.felk.cvut.cz Git - arc.git/blob - include/Compiler.h
Merged in from cc_gw
[arc.git] / include / Compiler.h
1 /* -------------------------------- Arctic Core ------------------------------\r
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
3  *\r
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
5  *\r
6  * This source code is free software; you can redistribute it and/or modify it\r
7  * under the terms of the GNU General Public License version 2 as published by the\r
8  * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.\r
9  *\r
10  * This program is distributed in the hope that it will be useful, but\r
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\r
13  * for more details.\r
14  * -------------------------------- Arctic Core ------------------------------*/\r
15 \r
16 \r
17 \r
18 \r
19 \r
20 \r
21 \r
22 \r
23 \r
24 /* See CopmpilerAbstraction.pdf */\r
25 #ifndef COMPILER_H\r
26 #define COMPILER_H\r
27 \r
28 /* REQ:COMPILER040,049,051 */\r
29 #define AUTOMATIC\r
30 #define STATIC  static\r
31 #define NULL_PTR        ((void *)0)\r
32 \r
33 #if defined(__GNUC__)\r
34 #define CC_EXTENSION    __extension__\r
35 #elif defined(__CWCC__)\r
36 #define CC_EXTENSION\r
37 #endif\r
38 \r
39 /* REQ:COMPILER005 */\r
40 /* TODO: skip the memclass for now */\r
41 #define FUNC(rettype,memclass) rettype\r
42 \r
43 /* REQ:COMPILER006 */\r
44 #define P2VAR(ptrtype, memclass, ptrclass) ptrtype\r
45 \r
46 /* TODO: memclass and more */\r
47 #define P2CONST(ptrtype, memclass, ptrclass) ptrtype\r
48 \r
49 /* TODO: memclass and more */\r
50 #define CONSTP2VAR(ptrtype,memclass,ptrclass) ptrclass ptrtype * const\r
51 \r
52 /* TODO: */\r
53 #define P2FUNC(rettype,ptrclass,fctname) retype (*ptrclass,fctname)\r
54 \r
55 /* TODO: */\r
56 #define CONST(consttype,memclass) const consttype\r
57 \r
58 /* TODO: */\r
59 #define VAR(vartype,memclass) vartype\r
60 \r
61 \r
62 \r
63 #endif /* COMPILER_H */ \r