Index: mojo/public/c/system/macros.h |
diff --git a/mojo/public/c/system/macros.h b/mojo/public/c/system/macros.h |
index ae88249ec6411d6b0ccf0f3d828d184fccff2de0..ff772f7f489d3a89bdefa965e80ade65dff65d56 100644 |
--- a/mojo/public/c/system/macros.h |
+++ b/mojo/public/c/system/macros.h |
@@ -73,7 +73,8 @@ namespace mojo { template <bool> struct CompileAssert {}; } |
// Unlike the C++11 |alignas()|, |alignment| must be an integer. It may not be a |
// type, nor can it be an expression like |MOJO_ALIGNOF(type)| (due to the |
// non-C++11 MSVS version). |
-#if __cplusplus >= 201103L |
+#if __cplusplus >= 201103L && \ |
+ (defined(__clang__) || (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 >= 40800)) |
viettrungluu
2014/07/29 17:47:28
What about future versions of MSVC? This would be
|
#define MOJO_ALIGNAS(alignment) alignas(alignment) |
#elif defined(__GNUC__) |
#define MOJO_ALIGNAS(alignment) __attribute__((aligned(alignment))) |