https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119776
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |jakub at gcc dot gnu.org Status|UNCONFIRMED |NEW Last reconfirmed| |2025-04-14 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Even the man page is inconsistent. gcobol [-Dname[=value]] [-E] [-fdefaultbyte=value] [-fsyntax-only] [-Icopybook-path] [-fmax-errors=nerror] [-nomain | -main filename | -main=filename (here it documents the -fmax-errors=nerror form) and and -fmax-errors nerror nerror represents the number of error messages produced. Without this option, gcobol attempts to recover from a syntax error by resuming compilation at the next statement, continuing until end-of-file. With it, gcobol counts the messages as they're produced, and stops when nerror is reached. where it doesn't use =. So, unless it is intentional to also support -fmax-errors nerror form I'd go for 2025-04-14 Jakub Jelinek <ja...@redhat.com> PR cobol/119776 * lang.opt (fmax-errors): Remove. * lang.opt.urls: Regenerate. * cobol1.cc (cobol_langhook_handle_option): Use OPT_fmax_errors_ rather than OPT_fmax_errors. * gcobol.1: Document -fmax-errors=nerror rather than -fmax-errors nerror. --- gcc/cobol/lang.opt.jj 2025-04-14 11:08:31.808821317 +0200 +++ gcc/cobol/lang.opt 2025-04-14 11:20:52.369700721 +0200 @@ -89,10 +89,6 @@ finternal-ebcdic Cobol Var(cobol_ebcdic, 1) Init(0) -finternal-ebcdic Internal processing is in EBCDIC Code Page 1140 -fmax-errors -Cobol Joined Separate -; Documented in C - fstatic-call Cobol Var(cobol_static_call, 1) Init(1) Enable/disable static linkage for CALL literals --- gcc/cobol/lang.opt.urls.jj 2025-04-14 10:57:06.579176798 +0200 +++ gcc/cobol/lang.opt.urls 2025-04-14 11:21:03.157553577 +0200 @@ -16,9 +16,6 @@ LangUrlSuffix_Fortran(gfortran/Fortran-D ffree-form LangUrlSuffix_Fortran(gfortran/Fortran-Dialect-Options.html#index-ffree-form) -fmax-errors -UrlSuffix(gcc/Warning-Options.html#index-fmax-errors) LangUrlSuffix_D(gdc/Warnings.html#index-fmax-errors) - iprefix UrlSuffix(gcc/Directory-Options.html#index-iprefix) LangUrlSuffix_D(gdc/Directory-Options.html#index-iprefix) LangUrlSuffix_Fortran(gfortran/Preprocessing-Options.html#index-iprefix) --- gcc/cobol/cobol1.cc.jj 2025-04-14 11:09:22.619126924 +0200 +++ gcc/cobol/cobol1.cc 2025-04-14 11:26:23.843179471 +0200 @@ -385,7 +385,7 @@ cobol_langhook_handle_option (size_t sco return true; } - case OPT_fmax_errors: + case OPT_fmax_errors_: flag_max_errors = atoi(arg); return true; --- gcc/cobol/gcobol.1.jj 2025-04-08 14:08:48.595318840 +0200 +++ gcc/cobol/gcobol.1 2025-04-14 11:19:17.017003687 +0200 @@ -224,7 +224,7 @@ had appeared. Not all exception conditions are implemented. Any that are not produce a warning message. . -.It Fl fmax-errors Ar nerror +.It Fl fmax-errors Ns Li = Ns Ar nerror .Ar nerror represents the number of error messages produced. Without this option, .Nm