[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 03/10] gnulib/regexec: Resolve unused variable

From: Paul Eggert
Subject: Re: [PATCH v2 03/10] gnulib/regexec: Resolve unused variable
Date: Wed, 1 Dec 2021 19:12:28 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 12/1/21 13:01, Robbie Harwood wrote:
The reason for this issue is that we are not building with DEBUG set and
this in turn means that the assert() that reads the value of the
variable match_last is being processed out.

Could you explain what goes wrong? regexec_internal.h does this:

#if defined DEBUG && DEBUG != 0
# include <assert.h>
# define DEBUG_ASSERT(x) assert (x)
# define DEBUG_ASSERT(x) assume (x)

so the later 'DEBUG_ASSERT (match_last != -1);' expands to 'assume (match_last != -1);'. And verify.h defines 'assume(R)' to evaluate R so match_last is used there (unless you're using Microsoft's compiler in which case it is equivalent to '__assume (R)'; are you having problems with Microsoft's compiler?).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]