From: Ramsay Jones Date: Sat, 14 Jan 2023 15:14:44 GMT Subject: Re: [PATCH] ci: do not die on deprecated-declarations warning Message-ID: <7498bff0-782f-8c81-5817-ed841f12dbba@ramsayjones.plus.com> In-Reply-To: <11dccdea-0e33-6669-9554-19f064df6010@ramsayjones.plus.com> On 14/01/2023 14:29, Ramsay Jones wrote: > Hi Junio, [snip] > Sorry for not looking into this (and notifying the list) sooner. Ah, that reminds me... When I updated to Linux Mint v21.0 (based on latest Ubuntu LTS) last year, sparse started failing. This was due to a change to the 'regex.h' header file (the libc6-dev package version was updated from 2.31 to 2.35), where (among other things) the diff looked like: .. 524a525,548 > #ifndef _REGEX_NELTS > # if (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__ \ > && !defined __STDC_NO_VLA__) > # define _REGEX_NELTS(n) n > # else > # define _REGEX_NELTS(n) > # endif > #endif > .. 645c681,682 < regmatch_t __pmatch[_Restrict_arr_], --- > regmatch_t __pmatch[_Restrict_arr_ > _REGEX_NELTS (__nmatch)], .. The last hunk is the declaration of regexec(), thus: extern int regexec (const regex_t *_Restrict_ __preg, const char *_Restrict_ __String, size_t __nmatch, regmatch_t __pmatch[_Restrict_arr_ _REGEX_NELTS (__nmatch)], int __eflags); So, sparse falls over on the '__nmatch' as part of the __pmatch argument declaration. [Actually, it doesn't bomb out on the declaration, but at each regexec() call site]. To fix my build, I added the following to my config.mak file on linux: SPARSE_FLAGS += -D__STDC_NO_VLA__ .. and forgot about it! :) I need to fix this sometime. ATB, Ramsay Jones