From 2713226fe5e2987e7c9ce2d8307379fa92f634a4 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Fri, 30 Jun 2023 23:03:09 -0400 Subject: [PATCH] libcdecl: Simplify mixed type name error condition. "List item X is either not the first or not the last item" is just a very complicated way to say "the list has more than one item". --- src/parse-decl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parse-decl.c b/src/parse-decl.c index 6ab624e..3137859 100644 --- a/src/parse-decl.c +++ b/src/parse-decl.c @@ -514,8 +514,8 @@ static int do_postprocess(struct cdecl *decl, int english_mode) if (!valid_declspecs(i, true)) return 0; - if (cdecl_is_abstract(i->declarators) - && (i != decl || i->next)) { + if (decl->next && cdecl_is_abstract(i->declarators)) { + /* Abstract full declarators: there can only be one. */ cdecl__errmsg(CDECL__EDECLTYPE); return 0; } -- 2.43.2