EPICS Base  7.0.6.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 #ifdef __clang__
25 # error compiler/gcc/compilerSpecific.h is not for use with the clang compiler
26 #endif
27 
28 #define EPICS_ALWAYS_INLINE __inline__ __attribute__((always_inline))
29 
30 /* Expands to a 'const char*' which describes the name of the current function scope */
31 #define EPICS_FUNCTION __PRETTY_FUNCTION__
32 
33 #ifdef __cplusplus
34 
35 /*
36  * in general we don't like ifdefs but they do allow us to check the
37  * compiler version and make the optimistic assumption that
38  * standards incompliance issues will be fixed by future compiler
39  * releases
40  */
41 
42 /*
43  * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
44  */
45 #define CXX_PLACEMENT_DELETE
46 
47 #endif /* __cplusplus */
48 
49 /*
50  * Enable format-string checking if possible
51  */
52 #define EPICS_PRINTF_STYLE(f,a) __attribute__((format(__printf__,f,a)))
53 
54 /*
55  * Deprecation marker
56  */
57 #define EPICS_DEPRECATED __attribute__((deprecated))
58 
59 /*
60  * Unused marker
61  */
62 #define EPICS_UNUSED __attribute__((unused))
63 
64 #endif /* ifndef compilerSpecific_h */