https://gcc.gnu.org/g:9d7e388013abe9463020e11462be43c25373f63a

commit r17-4431-g9d7e388013abe9463020e11462be43c25373f63a
Author: Xavier Del Campo Romero <[email protected]>
Date:   Thu Sep 17 23:12:54 2026 +0200

    cobol: Use %qs for path
    
    The documentation for GCC suggests the use of %qs for file paths. [1]
    
    [1]: 
https://gcc.gnu.org/onlinedocs/libgdiagnostics/topics/message-formatting.html
    
    gcc/cobol/ChangeLog:
    
            * cdf-copy.cc (copybook_elem_t::open_file): Use %qs.

Diff:
---
 gcc/cobol/cdf-copy.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/cobol/cdf-copy.cc b/gcc/cobol/cdf-copy.cc
index 978896650464..6c52b6aeeedc 100644
--- a/gcc/cobol/cdf-copy.cc
+++ b/gcc/cobol/cdf-copy.cc
@@ -291,7 +291,7 @@ copybook_elem_t::open_file( const char directory[], bool 
literally ) {
     }
     this->source.name = path;
     if( ! cobol_filename(this->source.name, inode_of(fd)) ) {
-      error_msg(source.loc, "recursive copybook: '%s' includes itself", path);
+      error_msg(source.loc, "recursive copybook: %qs includes itself", path);
       goto failure;
     }
     cbl_message(LexInputN, "opening %qs for input", source.name);

Reply via email to