Hello, I would like to contribute this patch to GCC. Could someone review and apply this patch for me?
Please use the attached patch rather than the email body; I have yet to set up git send-email. Thanks! -- 8< -- It seems likely the original author meant to use either "and" or "for" in this comment rather than both. We can remove the "for" to make it slightly more clear that the declarator for the function-definition and everything left in the function-definition would be handled here. gcc/cp/ChangeLog: * parser.cc (omp_maybe_record_variant_base): Adjust comment. Signed-off-by: Ben Wu <[email protected]> --- gcc/cp/parser.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index 4289f47e1b2..903e2cbf17a 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -24880,8 +24880,8 @@ omp_maybe_record_variant_base (cp_parser* parser, tree decl) befriended it). If FUNCTION_DEFINITION_ALLOWED_P then we handle the declarator and - for a function-definition here as well. If the declarator is a - declarator for a function-definition, *FUNCTION_DEFINITION_P will + the rest of a function-definition here as well. If the declarator is + a declarator for a function-definition, *FUNCTION_DEFINITION_P will be TRUE upon return. By that point, the function-definition will have been completely parsed. -- 2.43.0
From 3c4997b13624b9560ec7eb611829d1b74b5a13cb Mon Sep 17 00:00:00 2001 From: benwu25 <[email protected]> Date: Mon, 1 Dec 2025 23:15:10 -0800 Subject: [PATCH] c++: adjust comment wording in cp_parser_init_declarator It seems likely the original author meant to use either "and" or "for" in this comment rather than both. We can remove the "for" to make it slightly more clear that the declarator for the function-definition and everything left in the function-definition would be handled here. gcc/cp/ChangeLog: * parser.cc (omp_maybe_record_variant_base): Adjust comment. Signed-off-by: Ben Wu <[email protected]> --- gcc/cp/parser.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index 4289f47e1b2..903e2cbf17a 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -24880,8 +24880,8 @@ omp_maybe_record_variant_base (cp_parser* parser, tree decl) befriended it). If FUNCTION_DEFINITION_ALLOWED_P then we handle the declarator and - for a function-definition here as well. If the declarator is a - declarator for a function-definition, *FUNCTION_DEFINITION_P will + the rest of a function-definition here as well. If the declarator is + a declarator for a function-definition, *FUNCTION_DEFINITION_P will be TRUE upon return. By that point, the function-definition will have been completely parsed. -- 2.43.0
