[m-rev.] diff: fix a problem with the configure script and MSVC

Julien Fischer jfischer at opturion.com
Fri Mar 30 18:32:11 AEDT 2018


Fix a problem with the configure script and MSVC.

m4/mercury.m4:
      The recently added MERCURY_TRY_STATIC_ASSERT macro uses a struct
      with the tag name 'static_assert'.  This is problematic with MSVC
      as 'static_assert' is a C++ keyword.  Use a different tag name
      in order to avoid this.

Julien.

diff --git a/m4/mercury.m4 b/m4/mercury.m4
index 0276616..a06baec 100644
--- a/m4/mercury.m4
+++ b/m4/mercury.m4
@@ -186,7 +186,7 @@ AC_DEFUN([MERCURY_TRY_STATIC_ASSERT], [
      AC_TRY_COMPILE(
  	[$1],
  	[
-	    struct static_assert {
+	    struct mercury_static_assert {
  		int static_assert_expr : ( $2 ) ? 1 : -1;
  	    };
  	],


More information about the reviews mailing list