From 028b87ba5781880d0ebc738ef8a4a40318306768 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 8403b449..79cd8eae 100644 --- a/os_dep.c +++ b/os_dep.c @@ -4479,7 +4479,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.40.0