From: Ivan Maidanski Date: Mon, 30 Jan 2017 03:51:12 +0000 (+0300) Subject: Fix 'zero-size array is extension' Clang warning in os_dep (Linux/x86) X-Git-Tag: v8.0.0~942 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51b74dd2a850e4fee7fb8937f440a35b6856b38e;p=gc 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. --- diff --git a/os_dep.c b/os_dep.c index 987158ab..0fb5ccc0 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