https://gcc.gnu.org/g:e92c2026f59ebfa4582beb4cda784bada7efb0b5

commit r17-4443-ge92c2026f59ebfa4582beb4cda784bada7efb0b5
Author: Xavier Del Campo Romero <[email protected]>
Date:   Fri Sep 18 11:44:41 2026 +0200

    cobol: Replace redundant passby_str with cbl_ffi_crv_str
    
    gcc/cobol/ChangeLog:
    
            * parse.y: Replace redundant passby_str with cbl_ffi_crv_str.

Diff:
---
 gcc/cobol/parse.y | 26 ++++----------------------
 1 file changed, 4 insertions(+), 22 deletions(-)

diff --git a/gcc/cobol/parse.y b/gcc/cobol/parse.y
index 2766b07f1718..2de650c70b85 100644
--- a/gcc/cobol/parse.y
+++ b/gcc/cobol/parse.y
@@ -13066,24 +13066,6 @@ bad_arg( const char name[],
   return ok;
 }  
 
-static const char *
-passby_str(int mask)
-{
-  switch( mask ) {
-  case by_default_e:
-  case by_reference_e:
-    return "BY REFERENCE";
-  case by_content_e:
-    return "BY CONTENT";
-  case by_value_e:
-    return "BY VALUE";
-  default:
-    break;
-  }
-
-  return "UNKNOWN PASSING METHOD";
-}
-
 // Verify provided actual parameters against formals.
 static void
 verify_args( const YYLTYPE& loc, 
@@ -13104,16 +13086,16 @@ verify_args( const YYLTYPE& loc,
      */
     if( ord < narg ) {
       if( ord < formals.size() ) {
-        error_msg( parg->refer.loc, "parameter %zu %s %qs (%s, capacity %u, 
%s) "
-                   "invalid for %qs parameter %s %qs (%s, capacity %u, %s)",
+        error_msg( parg->refer.loc, "parameter %zu BY %s %qs (%s, capacity %u, 
%s) "
+                   "invalid for %qs parameter BY %s %qs (%s, capacity %u, %s)",
                    1 + ord,
-                   passby_str(parg->crv),
+                   cbl_ffi_crv_str(parg->crv),
                    nice_name_of(parg->field()),
                     cbl_field_type_name(parg->field()->type),
                     parg->field()->data.capacity(),
                     parg->field()->attr & signable_e ? "signed" : "unsigned",
                    name, 
-                   passby_str(formals[ord].crv),
+                   cbl_ffi_crv_str(formals[ord].crv),
                    nice_name_of(formals[ord].refer.field),
                    cbl_field_type_name(formals[ord].refer.field->type),
                    formals[ord].refer.field->data.capacity(),

Reply via email to