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

commit r15-7952-gc20e24f8e7318bb50fa0dab98012d9c2f3dbf55b
Author: Richard Biener <rguent...@suse.de>
Date:   Tue Mar 11 11:29:51 2025 +0100

    Fixup gcobol driver handling of -print-* options
    
    We are not supposed to diagnose missing input files.
    
    gcc/cobol/
            * gcobolspec.cc (lang_specific_driver): For OPT_print_* do
            not error on no input files.

Diff:
---
 gcc/cobol/gcobolspec.cc | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gcc/cobol/gcobolspec.cc b/gcc/cobol/gcobolspec.cc
index 20ca757fa871..f3f9c327cd0a 100644
--- a/gcc/cobol/gcobolspec.cc
+++ b/gcc/cobol/gcobolspec.cc
@@ -406,6 +406,18 @@ lang_specific_driver (struct cl_decoded_option 
**in_decoded_options,
         n_mains += 1;
         break;
 
+      case OPT_print_search_dirs:
+      case OPT_print_file_name_:
+      case OPT_print_prog_name_:
+      case OPT_print_multi_lib:
+      case OPT_print_multi_directory:
+      case OPT_print_sysroot:
+      case OPT_print_multi_os_directory:
+      case OPT_print_multiarch:
+      case OPT_print_sysroot_headers_suffix:
+       no_files_error = false;
+       break;
+
       case OPT_v:
         no_files_error = false;
         verbose = true;

Reply via email to