From 26e57d4632e9895ec4e360d9456426253a49124d Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Fri, 1 Mar 2024 13:55:25 +0100 Subject: [PATCH] cl/gcc: fix compatibility with host gcc-14.x This commit fixes the following build-time error: ``` cl/gcc/clplug.c: In function 'bool error_detected()': cl/gcc/clplug.c:480:52: error: invalid types '[diagnostic_t]' for array subscript 480 | return global_dc && global_dc->diagnostic_count[DK_ERROR]; | ^ ``` Related: https://github.com/kdudka/predator/pull/92 Resolves: https://github.com/kdudka/predator/pull/93 --- cl/gcc/clplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cl/gcc/clplug.c b/cl/gcc/clplug.c index 86da63c65..1a5769dfa 100644 --- a/cl/gcc/clplug.c +++ b/cl/gcc/clplug.c @@ -477,7 +477,7 @@ static void var_db_insert(var_db_t db, struct cl_var *var) static bool error_detected(void) { - return global_dc && global_dc->diagnostic_count[DK_ERROR]; + return global_dc && errorcount; } static void read_gcc_location(struct cl_loc *loc, location_t gcc_loc)