From fc9b5ad4ba26fa6e6082c859935f9f73d8f0e661 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Tue, 16 Jan 2024 12:24:53 -0800 Subject: [PATCH] Guard use of VLAs for __STDC_NO_VLA__ to support non-VLA implementations like MSVC. --- random/random.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/random/random.h b/random/random.h index 4d654cc..92f0dfb 100644 --- a/random/random.h +++ b/random/random.h @@ -9,7 +9,7 @@ #if defined(HEDLEY_ARRAY_PARAM) # define PSNIP_RANDOM_ARRAY_PARAM(expr) HEDLEY_ARRAY_PARAM(expr) -#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus) && !defined(__PGI) +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && (!defined(__STDC_NO_VLA__) || !__STDC_NO_VLA__) && !defined(__cplusplus) && !defined(__PGI) # define PSNIP_RANDOM_ARRAY_PARAM(expr) (expr) #else # define PSNIP_RANDOM_ARRAY_PARAM(expr)