From 51b74dd2a850e4fee7fb8937f440a35b6856b38e Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Mon, 30 Jan 2017 06:51:12 +0300 Subject: [PATCH] Fix 'zero-size array is extension' Clang warning in os_dep (Linux/x86) * os_dep.c [I386 && LINUX && SAVE_CALL_CHAIN] (struct frame): Do not declare fr_arg[NARGS] field if NARGS is zero. --- os_dep.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/os_dep.c b/os_dep.c index 987158a..0fb5ccc 100644 --- a/os_dep.c +++ b/os_dep.c @@ -4384,7 +4384,9 @@ GC_API int GC_CALL GC_get_pages_executable(void) struct frame { struct frame *fr_savfp; long fr_savpc; - long fr_arg[NARGS]; /* All the arguments go here. */ +# if NARGS > 0 + long fr_arg[NARGS]; /* All the arguments go here. */ +# endif }; #endif -- 2.7.4