From bf7dd87b6eab5bb456dc725f3902ff822474445e Mon Sep 17 00:00:00 2001 From: Ofek Shilon Date: Wed, 13 Jul 2022 20:04:17 +0300 Subject: [PATCH] Fix #54 - add __declspec(noalias) for any MSVC --- hedley.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hedley.h b/hedley.h index 8a713e6..fb53e99 100644 --- a/hedley.h +++ b/hedley.h @@ -1490,6 +1490,8 @@ HEDLEY_DIAGNOSTIC_POP HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) # define HEDLEY_CONST __attribute__((__const__)) +#elif defined(_MSC_VER) +# define HEDLEY_CONST __declspec(noalias) #elif \ HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) # define HEDLEY_CONST _Pragma("no_side_effect")