Merge ~info-martin-konrad/epics-base:simplify-compiler-specific-macros into ~epics-core/epics-base/+git/epics-base:3.15

Proposed by Martin Konrad
Status: Superseded
Proposed branch: ~info-martin-konrad/epics-base:simplify-compiler-specific-macros
Merge into: ~epics-core/epics-base/+git/epics-base:3.15
Diff against target: 79 lines (+7/-28)
2 files modified
src/libCom/osi/compiler/gcc/compilerSpecific.h (+5/-17)
src/libCom/osi/compiler/msvc/compilerSpecific.h (+2/-11)
Reviewer Review Type Date Requested Status
Andrew Johnson Disapprove
mdavidsaver Approve
Review via email: mp+375451@code.launchpad.net

This proposal has been superseded by a proposal from 2019-11-13.

Description of the change

No impact on users. Let's merge this into 3.15 and 7.0.

To post a comment you must log in.
Revision history for this message
mdavidsaver (mdavidsaver) wrote :

Fine by me. Though this will (further) remove support for gcc 2. Also Visual Studio .NET 2002 (7.0).

review: Approve
Revision history for this message
Andrew Johnson (anj) wrote :

Doing this on 3.15 is going to be a problem, both https://epics.anl.gov/base/R3-15/index.php and https://jenkins.aps.anl.gov/job/epics-base-3.15-vx55/ show that we still support VxWorks 5.5 on the 3.15 branch, and that comes with gcc-2.96+. Sorry.

Doing it on 7.0 would be fine by me though.

review: Disapprove

Unmerged commits

be65dc3... by Martin Konrad

Simplify definition of compiler-specific macros

Remove conditionals for older compiler versions that aren't
supported by EPICS Base anymore.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/libCom/osi/compiler/gcc/compilerSpecific.h b/src/libCom/osi/compiler/gcc/compilerSpecific.h
2index ca46a93..e37f0fc 100644
3--- a/src/libCom/osi/compiler/gcc/compilerSpecific.h
4+++ b/src/libCom/osi/compiler/gcc/compilerSpecific.h
5@@ -24,11 +24,7 @@
6 # error compiler/gcc/compilerSpecific.h is not for use with the clang compiler
7 #endif
8
9-#if __GNUC__ > 2
10-# define EPICS_ALWAYS_INLINE __inline__ __attribute__((always_inline))
11-#else
12-# define EPICS_ALWAYS_INLINE __inline__
13-#endif
14+#define EPICS_ALWAYS_INLINE __inline__ __attribute__((always_inline))
15
16 #ifdef __cplusplus
17
18@@ -43,14 +39,8 @@
19 * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
20 * CXX_THROW_SPECIFICATION - defined if compiler supports throw specification
21 */
22-
23-#if __GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 95 )
24-# define CXX_THROW_SPECIFICATION
25-#endif
26-
27-#if __GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 96 )
28-# define CXX_PLACEMENT_DELETE
29-#endif
30+#define CXX_THROW_SPECIFICATION
31+#define CXX_PLACEMENT_DELETE
32
33 #endif /* __cplusplus */
34
35@@ -60,11 +50,9 @@
36 #define EPICS_PRINTF_STYLE(f,a) __attribute__((format(__printf__,f,a)))
37
38 /*
39- * Deprecation marker if possible
40+ * Deprecation marker
41 */
42-#if (__GNUC__ > 2)
43-# define EPICS_DEPRECATED __attribute__((deprecated))
44-#endif
45+#define EPICS_DEPRECATED __attribute__((deprecated))
46
47 /*
48 * Unused marker
49diff --git a/src/libCom/osi/compiler/msvc/compilerSpecific.h b/src/libCom/osi/compiler/msvc/compilerSpecific.h
50index 49cf266..630ef97 100644
51--- a/src/libCom/osi/compiler/msvc/compilerSpecific.h
52+++ b/src/libCom/osi/compiler/msvc/compilerSpecific.h
53@@ -20,11 +20,7 @@
54 # error compiler/msvc/compilerSpecific.h is only for use with the Microsoft compiler
55 #endif
56
57-#if _MSC_VER >= 1200
58 #define EPICS_ALWAYS_INLINE __forceinline
59-#else
60-#define EPICS_ALWAYS_INLINE __inline
61-#endif
62
63 #ifdef __cplusplus
64
65@@ -39,13 +35,8 @@
66 * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
67 * CXX_THROW_SPECIFICATION - defined if compiler supports throw specification
68 */
69-#if _MSC_VER >= 1200 /* visual studio 6.0 or later */
70-# define CXX_PLACEMENT_DELETE
71-#endif
72-
73-#if _MSC_VER > 1300 /* some release after visual studio 7 we hope */
74-# define CXX_THROW_SPECIFICATION
75-#endif
76+#define CXX_PLACEMENT_DELETE
77+#define CXX_THROW_SPECIFICATION
78
79 #endif /* __cplusplus */
80

Subscribers

People subscribed via source and target branches