The check is redundant. Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
Ready to be installed? Thanks, Martin gcc/cp/ChangeLog: PR c++/99616 * decl.c (grokdeclarator): Remove redundant NULL check. --- gcc/cp/decl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 8e8f37d060e..dc2c79997ee 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -12244,7 +12244,7 @@ grokdeclarator (const cp_declarator *declarator, int attr_flags; attr_flags = 0; - if (declarator == NULL || declarator->kind == cdk_id) + if (declarator->kind == cdk_id) attr_flags |= (int) ATTR_FLAG_DECL_NEXT; if (declarator->kind == cdk_function) attr_flags |= (int) ATTR_FLAG_FUNCTION_NEXT; -- 2.31.1