On Thu, Jan 16, 2020 at 3:59 PM Thomas Munro <thomas.mu...@gmail.com> wrote: > On Wed, Jan 15, 2020 at 11:30 AM Tom Lane <t...@sss.pgh.pa.us> wrote: > > Yeah, it's been doing that for decades. I think the triggering > > factor is the typedef name (Var, here) preceding the &&.
Here's a better fix: diff --git a/indent.c b/indent.c index 9faf57a..51a60a6 100644 --- a/indent.c +++ b/indent.c @@ -570,8 +570,11 @@ check_type: ps.in_or_st = false; /* turn off flag for structure decl or * initialization */ } - /* parenthesized type following sizeof or offsetof is not a cast */ - if (ps.keyword == 1 || ps.keyword == 2) + /* + * parenthesized type following sizeof or offsetof is not a cast; + * likewise for function-like macros that take a type + */ + if (ps.keyword == 1 || ps.keyword == 2 || ps.last_token == ident) ps.not_cast_mask |= 1 << ps.p_l_follow; break;