This is Unofficial EPICS BASE Doxygen Site
compilerSpecific.h
Go to the documentation of this file.
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 * EPICS BASE is distributed subject to a Software License Agreement found
7 * in file LICENSE that is included with this distribution.
8 \*************************************************************************/
9 
10 /*
11  * Author:
12  * Jeffrey O. Hill
13  * johill@lanl.gov
14  */
15 
16 #ifndef compilerSpecific_h
17 #define compilerSpecific_h
18 
19 #ifndef __clang__
20 # error compiler/clang/compilerSpecific.h is only for use with the clang compiler
21 #endif
22 
23 #if __has_attribute(always_inline)
24 #define EPICS_ALWAYS_INLINE __inline__ __attribute__((always_inline))
25 #else
26 #define EPICS_ALWAYS_INLINE __inline__
27 #endif
28 
29 /* Expands to a 'const char*' which describes the name of the current function scope */
30 #define EPICS_FUNCTION __PRETTY_FUNCTION__
31 
32 #ifdef __cplusplus
33 
34 /*
35  * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
36  */
37 #define CXX_PLACEMENT_DELETE
38 
39 #endif /* __cplusplus */
40 
41 /*
42  * __has_attribute() is not supported on all versions of clang yet
43  */
44 
45 /*
46  * Enable format-string checking
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 */