[rtems commit] score: Fix for GCC version 5 and later

Sebastian Huber sebh at rtems.org
Mon Mar 9 10:47:26 UTC 2015


Module:    rtems
Branch:    master
Commit:    25ce352bcb8668214178962e24b53b61fadd329a
Changeset: http://git.rtems.org/rtems/commit/?id=25ce352bcb8668214178962e24b53b61fadd329a

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Mar  9 11:43:55 2015 +0100

score: Fix for GCC version 5 and later

---

 cpukit/score/include/rtems/score/cpustdatomic.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cpukit/score/include/rtems/score/cpustdatomic.h b/cpukit/score/include/rtems/score/cpustdatomic.h
index cf34d48..46a44ef 100644
--- a/cpukit/score/include/rtems/score/cpustdatomic.h
+++ b/cpukit/score/include/rtems/score/cpustdatomic.h
@@ -19,7 +19,8 @@
 #include <rtems/score/basedefs.h>
 
 #ifdef RTEMS_SMP
-  #if defined(__cplusplus) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 9
+  #if defined(__cplusplus) \
+    && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9))
     /*
      * The GCC 4.9 ships its own <stdatomic.h> which is not C++ compatible.  The
      * suggested solution was to include <atomic> in case C++ is used.  This works




More information about the vc mailing list