From 09349da83d0ba3e2f7dbbb9c97983485a464aaf1 Mon Sep 17 00:00:00 2001
From: "James K. Lowden" <jklowden@symas.com>
Date: Fri, 26 Apr 2024 16:39:12 -0400
Subject: [PATCH] update documentation

---
 gcc/cobol/gcobol.1 | 31 ++++++++++++++++++++++++-------
 1 file changed, 24 insertions(+), 7 deletions(-)

diff --git a/gcc/cobol/gcobol.1 b/gcc/cobol/gcobol.1
index 8dd40e86cbef..54c12d10adaa 100644
--- a/gcc/cobol/gcobol.1
+++ b/gcc/cobol/gcobol.1
@@ -10,6 +10,7 @@
 .Nm
 .Op Fl D Ns Ar name Ns Oo Li = Ns Ar value Oc
 .Op Fl E
+.Op Fl Sy fsyntax-only
 .Op Fl I Ns Ar copybook-path
 .Op Fl fmax-errors Ns Li = Ns Ar nerror
 .Oo
@@ -98,11 +99,12 @@ output to indicate where copybook files were included.  For
 line-number consistency with the input, blank lines are retained.
 .Pp
 Unlike the C compiler, This option does not prevent compilation.
-One way to prevent compilation is to use the option
-.D1 Fl Sy preprocess Ar false
-because any preprocessor that returns a nonzero exit status terminates
-the compilation process.
-.
+To prevent compilation, use the option
+.D1 Fl Sy fsyntax-only 
+also.
+.It Fl Sy fsyntax-only
+Invoke only the parser. Check the code for syntax errors, but don't do
+anything beyond that.
 .It Fl ffixed-form
 Use strict
 .Em "Reference Format"
@@ -260,8 +262,23 @@ further altered by one or more filters.  In the tradition of
 each
 .Ar preprocess-filter
 reads from standard input and writes to standard output.
-No options or arguments are supported for
-.Ar preprocess-filter .
+.Pp
+To supply options to 
+.Ar preprocess-filter ,
+use a comma-separated string, similar to how linker options are supplied to
+.Fl Sy Wl .
+(Do not put any spaces after the commas, because the shell will treat it as an option separator.)
+.Nm
+replaces each comma with a space when 
+.Ar preprocess-filter
+is invoked.  For example,
+.D1 Fl preprocess Li tee,output.cbl
+invokes
+.Xr tee 1
+with the output filename argument
+.Pa output.cbl ,
+causing a copy of the input to be written to the file.
+.Pp
 .Nm
 searches the current working directory and the PATH environment
 variable directories for the existence of an executable file whose
-- 
GitLab