Fix GMX_ALIGNMENT for MSVC 2012 and 2013
authorRoland Schulz <roland@utk.edu>
Fri, 19 Jun 2015 03:37:16 +0000 (23:37 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 22 Jun 2015 17:09:43 +0000 (19:09 +0200)
Issue previously identified for 2010 is not fixed
until 2015.

Change-Id: I617ac9524a2e054b325fdc19675fdee0a60370c8

src/gromacs/utility/basedefinitions.h

index 4e5dc6d3e92e08a9edf74054fc9f3d8874860466..cc708bca062b8d241079deb6d8039cec9fb3b046 100644 (file)
@@ -240,8 +240,8 @@ typedef uint64_t gmx_uint64_t;
  */
 /* alignas(x) is not used even with GMX-CXX11 because it isn't in the list of
    tested features and thus might not be supported.
-   MSVC2010 has align but doesn't support sizeof inside. */
-#if defined(_MSC_VER) && (_MSC_VER >= 1700 || defined(__ICL))
+   MSVC before 2015 has align but doesn't support sizeof inside. */
+#if defined(_MSC_VER) && (_MSC_VER > 1800 || defined(__ICL))
 #  define GMX_ALIGNMENT 1
 #  define GMX_ALIGNED(type, alignment) __declspec(align(alignment*sizeof(type))) type
 #elif defined(__GNUC__) || defined(__clang__)