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

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

This proposal supersedes a proposal from 2019-11-12.

Description of the change

To post a comment you must log in.
Revision history for this message
mdavidsaver (mdavidsaver) wrote : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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
Revision history for this message
Andrew Johnson (anj) wrote :

The diff shown by this MR includes some additional commits that were made to 3.15 but haven't yet been merged up to 7.0, and it also doesn't reflect the fact that the libCom files have moved in the 7.0 branch. As I said before I agree with the aim, but this branch doesn't currently contain what you're actually wanting it to do.

You should be able to force-push the correct commit to the same branch on LP and the site will recalculate the MR diff automatically.

review: Needs Fixing
Revision history for this message
Martin Konrad (info-martin-konrad) wrote :

Oops, sorry, seems like I had pushed to the wrong remote... The good news is that Launchpad finally seems to update the preview diff in the MP correctly after force pushing :-)

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

Looks fine to me now, thanks.

review: Approve
Revision history for this message
mdavidsaver (mdavidsaver) wrote :

Cherry-picked as 13234afc405e15fde56e4ca3840f87f350aea75d

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/modules/libcom/src/osi/compiler/gcc/compilerSpecific.h b/modules/libcom/src/osi/compiler/gcc/compilerSpecific.h
2index 13d9119..e140d8b 100644
3--- a/modules/libcom/src/osi/compiler/gcc/compilerSpecific.h
4+++ b/modules/libcom/src/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 /* Expands to a 'const char*' which describes the name of the current function scope */
17 #define EPICS_FUNCTION __PRETTY_FUNCTION__
18@@ -46,14 +42,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@@ -63,11 +53,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/modules/libcom/src/osi/compiler/msvc/compilerSpecific.h b/modules/libcom/src/osi/compiler/msvc/compilerSpecific.h
50index 75bfa83..4e282db 100644
51--- a/modules/libcom/src/osi/compiler/msvc/compilerSpecific.h
52+++ b/modules/libcom/src/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 /* Expands to a 'const char*' which describes the name of the current function scope */
64 #define EPICS_FUNCTION __FUNCTION__
65@@ -42,13 +38,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