[Top][All Lists]

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

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

From: Daniel Brodsky
Subject: Re: [PATCH v4 0/2] Replaced locks with lock guard macros
Date: Sun, 29 Mar 2020 22:53:14 -0700

On Sat, Mar 28, 2020 at 9:12 AM Richard Henderson
<address@hidden> wrote:
> On 3/27/20 11:38 PM, Daniel Brodsky wrote:
> > On Thu, Mar 26, 2020 at 11:01 AM Richard Henderson
> > <address@hidden> wrote:
> >>
> >> My preference is to add -Wno-tautological-type-limit-compare in
> >> configure, so we don't have to work around this same issue elsewhere
> >> in the code base.
> >>
> >> r~
> >
> > What do you think would be the best way to add this? I could change
> > all additions of the `-m32` flag to instead use `-m32
> > -Wno-tautological-type-limit-compare` or add the flag if qemu is being
> > compiled with clang and `-m32` already enabled.
> I was going to add it unconditionally, with all of the other warning flags.
> Except that it doesn't work -- clang-9 *still* warns.  Clearly a clang bug, 
> but
> there doesn't seem to be any workaround at all except --disable-werror.
> r~
Using `#pragma clang diagnostic ignored
"-Wtautological-type-limit-compare"` suppresses the errors (on Clang
9). I could go and drop that in for the problem areas? There's only a
few so it wouldn't be a major change. I'm thinking of adding a macro
like this:
#define PRAGMA(x) _Pragma(stringify(x))
#define IF_IGNORE_TYPE_LIMIT(statement) \
        PRAGMA(clang diagnostic push) \
        PRAGMA(clang diagnostic ignored "-Wtautological-type-limit-compare") \
        if (statement) \
        PRAGMA(clang diagnostic pop)

and replacing the problem conditionals with it.


reply via email to

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