EPICS Base  7.0.8.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
compilerSpecific.h
1 /*************************************************************************\
2 * Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * SPDX-License-Identifier: EPICS
7 * EPICS BASE is distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution.
9 \*************************************************************************/
10 
11 /*
12  * Author:
13  * Jeffrey O. Hill
15  */
16 
17 #ifndef compilerSpecific_h
18 #define compilerSpecific_h
19 
20 #ifndef __GNUC__
21 # error compiler/gcc/compilerSpecific.h is only for use with the gnu compiler
22 #endif
23 
24 #define EPICS_ALWAYS_INLINE __inline__ __attribute__((always_inline))
25 
26 /* Expands to a 'const char*' which describes the name of the current function scope */
27 #define EPICS_FUNCTION __PRETTY_FUNCTION__
28 
29 #ifdef __cplusplus
30 
31 /*
32  * in general we don't like ifdefs but they do allow us to check the
33  * compiler version and make the optimistic assumption that
34  * standards incompliance issues will be fixed by future compiler
35  * releases
36  */
37 
38 /*
39  * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
40  */
41 #define CXX_PLACEMENT_DELETE
42 
43 #endif /* __cplusplus */
44 
45 /*
46  * Enable format-string checking if possible
47  */
48 #define EPICS_PRINTF_STYLE(f,a) __attribute__((format(__printf__,f,a)))
49 
50 /*
51  * Deprecation marker
52  */
53 #define EPICS_DEPRECATED __attribute__((deprecated))
54 
55 /*
56  * Unused marker
57  */
58 #define EPICS_UNUSED __attribute__((unused))
59 
60 #endif /* ifndef compilerSpecific_h */