Hi!
Last night I was surprised because make check help.exp reported the missing
dot at the end of cobol/lang.opt description below:
Wmove-index
Cobol Warning Var(move_index, 1) Init(1)
Warn if MOVE INDEX is used
but has not reported
fexec-national-charset=
Cobol Joined Var(cobol_national_charset) RejectNegative
Set the default execution character set for NATIONAL data items
a few lines earlier.
The problem is that help.exp verified output of
--help={common,optimizers,param,target,warnings} and just selected FEs:
--help={ada,c,c++,d,fortran,go} and no other languages.
Wmove-index above got reported because it appears in --help=warnings,
but fexec-national-charset= didn't, because it only appears in --help=cobol
So, the following patch adds 6 further languages to what help.exp tests
and fixes the reported bugs.
Tested on x86_64-linux, ok for trunk?
Note, Modula-2 seems to also not capitalize most of the descriptions,
while all other *.opt files do, shall we fix that too incrementally?
2026-01-20 Jakub Jelinek <[email protected]>
gcc/testsuite/
* gcc.misc-tests/help.exp: Check for descriptions without terminating
dot or semicolon also for objc, objc++, rust, modula-2, cobol and
algol68.
gcc/rust/
* lang.opt (frust-crate=, frust-extern=,
frust-incomplete-and-experimental-compiler-do-not-use,
frust-max-recursion-depth=, frust-crate-type=, frust-mangling=,
frust-cfg=, frust-edition=, frust-embed-metadata,
frust-metadata-output=, frust-compile-until=,
frust-name-resolution-2.0, frust-panic=, frust-overflow-checks): Add
dot at the end of the description.
gcc/cobol/
* lang.opt (fexec-national-charset=): Add dot at the end of the
description.
gcc/algol68/
* lang.opt (std=algol68, std=gnu68): Add dot at the end of the
description.
gcc/m2/
* lang.opt (Wpedantic-param-names, Wpedantic-cast, Wverbose-unbounded,
Wstyle, fauto-init, fbounds, fcase, fcpp, fcpp-end, fcpp-begin,
fdebug-builtins, fd, fdebug-function-line-numbers, fdef=,
fdump-system-exports, fextended-opaque, ffloatvalue,
fgen-module-list=, findex, fiso, flocation=, fm2-debug-trace=,
fm2-dump=, fm2-dump-decl=, fm2-dump-gimple=, fm2-dump-quad=,
fm2-dump-filter=, fm2-file-offset-bits=, fm2-g, fm2-lower-case,
fm2-pathname=, fm2-pathname-root=, fm2-pathname-rootI=, fm2-plugin,
fm2-prefix=, fm2-statistics, fm2-strict-type, fm2-strict-type-reason,
fm2-whole-program, fmod=, fnil, fpim, fpim2, fpim3, fpim4,
fpositive-mod-floor-div, fpthread, fq, frange, freturn,
fruntime-modules=, fscaffold-dynamic, fscaffold-c, fscaffold-c++,
fscaffold-main, fscaffold-static, fshared, fsoft-check-all, fsources,
fswig, fuse-list=, fwideset, fwholediv, fwholevalue, save-temps,
save-temps=): Add dot at the end of the description.
--- gcc/testsuite/gcc.misc-tests/help.exp.jj 2026-01-02 22:41:17.364552147
+0100
+++ gcc/testsuite/gcc.misc-tests/help.exp 2026-01-20 01:55:30.446257015
+0100
@@ -144,7 +144,8 @@ check_for_options c "--help=joined,undoc
# find the source a failure.
foreach cls { "ada" "c" "c++" "d" "fortran" "go" \
- "common" "optimizers" "param" "target" "warnings" } {
+ "objc" "objc++" "rust" "modula-2" "cobol" "algol68" \
+ "common" "optimizers" "param" "target" "warnings" } {
check_for_options c "--help=$cls" "" "^ +-.*\[^:.\]$" ""
}
--- gcc/rust/lang.opt.jj 2026-01-02 22:41:17.328552744 +0100
+++ gcc/rust/lang.opt 2026-01-20 02:05:42.916251018 +0100
@@ -60,11 +60,11 @@ Warn for infinitely recursive calls.
frust-crate=
Rust Joined RejectNegative
--frust-crate=<name> Set the crate name for the compilation
+-frust-crate=<name> Set the crate name for the compilation.
frust-extern=
Rust RejectNegative Joined
--frust-extern= Specify where an external library is located
+-frust-extern= Specify where an external library is located.
frust-debug
Rust Var(flag_rust_debug)
@@ -76,15 +76,15 @@ Rust Joined RejectNegative
frust-incomplete-and-experimental-compiler-do-not-use
Rust Var(flag_rust_experimental)
-Enable experimental compilation of Rust files at your own risk
+Enable experimental compilation of Rust files at your own risk.
frust-max-recursion-depth=
Rust RejectNegative Type(int) Var(rust_max_recursion_depth) Init(64)
--frust-max-recursion-depth=<integer>
+-frust-max-recursion-depth=<integer>.
frust-crate-type=
Rust Joined RejectNegative Enum(frust_crate_type) Var(flag_rust_crate_type)
--frust-crate-type=[bin|lib|rlib|dylib|cdylib|staticlib|proc-macro] Crate
type to emit
+-frust-crate-type=[bin|lib|rlib|dylib|cdylib|staticlib|proc-macro] Crate
type to emit.
Enum
Name(frust_crate_type) Type(int) UnknownError(unknown crate type: '%qs')
@@ -112,7 +112,7 @@ Enum(frust_crate_type) String(proc-macro
frust-mangling=
Rust Joined RejectNegative Enum(frust_mangling) Var(flag_rust_mangling)
--frust-mangling=[legacy|v0] Version to use for name mangling
+-frust-mangling=[legacy|v0] Version to use for name mangling.
Enum
Name(frust_mangling) Type(int) UnknownError(unknown rust mangling option %qs)
@@ -125,11 +125,11 @@ Enum(frust_mangling) String(v0) Value(1)
frust-cfg=
Rust Joined RejectNegative
--frust-cfg=<name> Set a config expansion option
+-frust-cfg=<name> Set a config expansion option.
frust-edition=
Rust Joined RejectNegative Enum(frust_edition) Var(flag_rust_edition)
--frust-edition=[2015|2018|2021] Edition to use when compiling rust
code
+-frust-edition=[2015|2018|2021] Edition to use when compiling rust
code.
Enum
Name(frust_edition) Type(int) UnknownError(unknown rust edition %qs)
@@ -145,11 +145,11 @@ Enum(frust_edition) String(2021) Value(2
frust-embed-metadata
Rust Var(flag_rust_embed_metadata)
-Enable embedding metadata directly into object files
+Enable embedding metadata directly into object files.
frust-metadata-output=
Rust Joined RejectNegative
--frust-metadata-output=<path.rox> Path to output crate metadata
+-frust-metadata-output=<path.rox> Path to output crate metadata.
o
Rust Joined Separate
@@ -157,7 +157,7 @@ Rust Joined Separate
frust-compile-until=
Rust Joined RejectNegative Enum(frust_compile_until)
Var(flag_rust_compile_until)
--frust-compile-until=[ast|attributecheck|expansion|astvalidation|featuregating|nameresolution|lowering|typecheck|privacy|unsafety|const|borrowcheck|compilation|end]
The pipeline will run up until this stage when compiling Rust code
+-frust-compile-until=[ast|attributecheck|expansion|astvalidation|featuregating|nameresolution|lowering|typecheck|privacy|unsafety|const|borrowcheck|compilation|end]
The pipeline will run up until this stage when compiling Rust code.
Enum
Name(frust_compile_until) Type(int) UnknownError(unknown rust compile-until
%qs)
@@ -206,7 +206,7 @@ Enum(frust_compile_until) String(end) Va
frust-name-resolution-2.0
Rust Var(flag_name_resolution_2_0) Init(1)
-Use the temporary and experimental name resolution pipeline instead of the
stable one
+Use the temporary and experimental name resolution pipeline instead of the
stable one.
frust-borrowcheck
Rust Var(flag_borrowcheck)
@@ -214,7 +214,7 @@ Use the WIP borrow checker.
frust-panic=
Rust Joined RejectNegative Enum(frust_panic) Var(flag_rust_panic)
--frust-edition=[unwind|abort] Panic strategy to compile crate with
+-frust-edition=[unwind|abort] Panic strategy to compile crate with.
Enum
Name(frust_panic) Type(int) UnknownError(unknown panic strategy %qs)
@@ -227,11 +227,11 @@ Enum(frust_panic) String(abort) Value(1)
frust-overflow-checks
Rust Var(flag_overflow_checks) Init(1)
-Enable the overflow checks in code generation
+Enable the overflow checks in code generation.
frust-assume-builtin-offset-of
Rust Var(flag_assume_builtin_offset_of)
-Define a built-in offset_of macro in the compiler and assume it is present
+Define a built-in offset_of macro in the compiler and assume it is present.
frust-unused-check-2.0
Rust Var(flag_unused_check_2_0)
--- gcc/cobol/lang.opt.jj 2026-01-20 01:29:54.856866624 +0100
+++ gcc/cobol/lang.opt 2026-01-20 01:56:57.868828783 +0100
@@ -79,7 +79,7 @@ Cobol Joined Var(cobol_charset) RejectNe
fexec-national-charset=
Cobol Joined Var(cobol_national_charset) RejectNegative
-Set the default execution character set for NATIONAL data items
+Set the default execution character set for NATIONAL data items.
;; warnings
--- gcc/algol68/lang.opt.jj 2026-01-02 22:41:16.716562890 +0100
+++ gcc/algol68/lang.opt 2026-01-20 01:57:30.548294894 +0100
@@ -102,11 +102,11 @@ Link the GNU Algol 68 run-time library d
std=algol68
Algol68
-Compile strict Algol 68 as defined by the Revised Report
+Compile strict Algol 68 as defined by the Revised Report.
std=gnu68
Algol68
-Accept GNU extensions to Algol 68
+Accept GNU extensions to Algol 68.
; Stropping regimes.
--- gcc/m2/lang.opt.jj 2026-01-02 22:41:17.249554054 +0100
+++ gcc/m2/lang.opt 2026-01-20 02:03:25.286499494 +0100
@@ -36,19 +36,19 @@ turns on case statement label compile ti
Wpedantic-param-names
Modula-2
-compiler checks to force definition module procedure parameter names with
their implementation module counterpart
+compiler checks to force definition module procedure parameter names with
their implementation module counterpart.
Wpedantic-cast
Modula-2
-compiler warns if a cast is being used on types of differing sizes
+compiler warns if a cast is being used on types of differing sizes.
Wverbose-unbounded
Modula-2
-inform user which parameters will be passed by reference
+inform user which parameters will be passed by reference.
Wstyle
Modula-2
-extra compile time semantic checking, typically tries to catch poor
programming style
+extra compile time semantic checking, typically tries to catch poor
programming style.
Wuninit-variable-checking
Modula-2
@@ -60,67 +60,67 @@ turns on compile time analysis to detect
fauto-init
Modula-2
-automatically initializes all pointers to NIL
+automatically initializes all pointers to NIL.
fbounds
Modula-2
-turns on runtime subrange, array index and indirection via NIL pointer checking
+turns on runtime subrange, array index and indirection via NIL pointer
checking.
fcase
Modula-2
-turns on runtime checking to check whether a CASE statement requires an ELSE
clause when one was not specified
+turns on runtime checking to check whether a CASE statement requires an ELSE
clause when one was not specified.
fcpp
Modula-2
-use cpp to preprocess the module
+use cpp to preprocess the module.
fcpp-end
Modula-2
-passed to the preprocessor if -fcpp is used (internal switch)
+passed to the preprocessor if -fcpp is used (internal switch).
fcpp-begin
Modula-2
-passed to the preprocessor if -fcpp is used (internal switch)
+passed to the preprocessor if -fcpp is used (internal switch).
fdebug-builtins
Modula-2
-call a real function, rather than the builtin equivalent
+call a real function, rather than the builtin equivalent.
fd
Modula-2
-turn on internal debugging of the compiler (internal switch)
+turn on internal debugging of the compiler (internal switch).
fdebug-function-line-numbers
Modula-2
-turn on tracing of procedure line numbers (internal switch)
+turn on tracing of procedure line numbers (internal switch).
fdef=
Modula-2 Joined
-recognize the specified suffix as a definition module filename
+recognize the specified suffix as a definition module filename.
fdump-system-exports
Modula-2
-display all inbuilt system items
+display all inbuilt system items.
fextended-opaque
Modula-2
-allows opaque types to be implemented as any type (a GNU Modula-2 extension)
+allows opaque types to be implemented as any type (a GNU Modula-2 extension).
ffloatvalue
Modula-2
-turns on runtime checking to check whether a floating point number will exceed
range
+turns on runtime checking to check whether a floating point number will exceed
range.
fgen-module-list=
Modula-2 Joined
-create a topologically sorted module list from all dependent modules used in
the application
+create a topologically sorted module list from all dependent modules used in
the application.
findex
Modula-2
-turns on all range checking for numerical values
+turns on all range checking for numerical values.
fiso
Modula-2
-use ISO dialect of Modula-2
+use ISO dialect of Modula-2.
flibs=
Modula-2 Joined
@@ -128,47 +128,47 @@ specify the library order, the libraries
flocation=
Modula-2 Joined
-set all location values to a specific value (internal switch)
+set all location values to a specific value (internal switch).
fm2-debug-trace=
Modula-2 Joined
-turn on internal debug tracing for quad,token,line,all (internal switch)
+turn on internal debug tracing for quad,token,line,all (internal switch).
fm2-dump=
Modula-2 Joined
-dump Modula-2 internal intemediate representation specified by:
all,quad,decl,gimple
+dump Modula-2 internal intemediate representation specified by:
all,quad,decl,gimple.
fm2-dump-decl=
Modula-2 Joined
-dump Modula-2 decls to the filename stem specified
+dump Modula-2 decls to the filename stem specified.
fm2-dump-gimple=
Modula-2 Joined
-dump Modula-2 gimple to the filename stem specified
+dump Modula-2 gimple to the filename stem specified.
fm2-dump-quad=
Modula-2 Joined
-dump Modula-2 quads to the filename stem specified
+dump Modula-2 quads to the filename stem specified.
fm2-dump-filter=
Modula-2 Joined
-filter the language dump using a comma separated list of procedures and modules
+filter the language dump using a comma separated list of procedures and
modules.
fm2-file-offset-bits=
Modula-2 Joined
-override the default 64 bit definition of SYSTEM.COFF_T with the argument
specified
+override the default 64 bit definition of SYSTEM.COFF_T with the argument
specified.
fm2-g
Modula-2
-generate extra nops to improve debugging, producing an instruction for every
code related keyword
+generate extra nops to improve debugging, producing an instruction for every
code related keyword.
fm2-lower-case
Modula-2
-generate error messages which render keywords in lower case
+generate error messages which render keywords in lower case.
fm2-pathname=
Modula-2 Joined
-specify the module mangled prefix name for all modules in the following
include paths
+specify the module mangled prefix name for all modules in the following
include paths.
fm2-pathnameI
Modula-2 Joined
@@ -176,7 +176,7 @@ Modula-2 Joined
fm2-pathname-root=
Modula-2 Joined
-add include paths for all the library names in -flibs= to this directory root
+add include paths for all the library names in -flibs= to this directory root.
fm2-pathname-rootI=
Modula-2 Joined
@@ -184,27 +184,27 @@ Modula-2 Joined
fm2-plugin
Modula-2
-insert plugin to identify runtime errors at compiletime
+insert plugin to identify runtime errors at compiletime.
fm2-prefix=
Modula-2 Joined
-specify the module mangled prefix name
+specify the module mangled prefix name.
fm2-statistics
Modula-2
-display statistics about the amount of source lines compiled and symbols used
+display statistics about the amount of source lines compiled and symbols used.
fm2-strict-type
Modula-2
-experimental flag to turn on the new strict type checker
+experimental flag to turn on the new strict type checker.
fm2-strict-type-reason
Modula-2
-provides more detail why the types are incompatible
+provides more detail why the types are incompatible.
fm2-whole-program
Modula-2
-compile all implementation modules and program module at once
+compile all implementation modules and program module at once.
fmem-report
Modula-2
@@ -212,87 +212,87 @@ Modula-2
fmod=
Modula-2 Joined
-recognize the specified suffix as implementation and module filenames
+recognize the specified suffix as implementation and module filenames.
fnil
Modula-2
-turns on runtime checking to detect accessing data through a NIL value pointer
+turns on runtime checking to detect accessing data through a NIL value pointer.
fpim
Modula-2
-use PIM [234] dialect of Modula-2
+use PIM [234] dialect of Modula-2.
fpim2
Modula-2
-use PIM 2 dialect of Modula-2
+use PIM 2 dialect of Modula-2.
fpim3
Modula-2
-use PIM 3 dialect of Modula-2
+use PIM 3 dialect of Modula-2.
fpim4
Modula-2
-use PIM 4 dialect of Modula-2
+use PIM 4 dialect of Modula-2.
fpositive-mod-floor-div
Modula-2
-force positive result from MOD and DIV result floor
+force positive result from MOD and DIV result floor.
fpthread
Modula-2
-link against the pthread library (default on)
+link against the pthread library (default on).
fq
Modula-2
-internal compiler debugging information, dump the list of quadruples
+internal compiler debugging information, dump the list of quadruples.
frange
Modula-2
-turns on all range checking for numerical values
+turns on all range checking for numerical values.
freturn
Modula-2
-turns on runtime checking for functions which finish without executing a
RETURN statement
+turns on runtime checking for functions which finish without executing a
RETURN statement.
fruntime-modules=
Modula-2 Joined
-specify the list of runtime modules and their initialization order
+specify the list of runtime modules and their initialization order.
fscaffold-dynamic
Modula-2
-the modules initialization order is dynamically determined by M2RTS and
application dependencies
+the modules initialization order is dynamically determined by M2RTS and
application dependencies.
fscaffold-c
Modula-2
-generate a C source scaffold for the current module being compiled
+generate a C source scaffold for the current module being compiled.
fscaffold-c++
Modula-2
-generate a C++ source scaffold for the current module being compiled
+generate a C++ source scaffold for the current module being compiled.
fscaffold-main
Modula-2
-generate the main function
+generate the main function.
fscaffold-static
Modula-2
-generate static scaffold initialization and finalization for every module
inside main
+generate static scaffold initialization and finalization for every module
inside main.
fshared
Modula-2
-generate a shared library from the module
+generate a shared library from the module.
fsoft-check-all
Modula-2
-turns on all software runtime checking (an abbreviation for -fnil -frange
-findex -fwholediv -fcase -freturn -fwholevalue -ffloatvalue)
+turns on all software runtime checking (an abbreviation for -fnil -frange
-findex -fwholediv -fcase -freturn -fwholevalue -ffloatvalue).
fsources
Modula-2
-display the location of module source files as they are compiled
+display the location of module source files as they are compiled.
fswig
Modula-2
-create a swig interface file for the module
+create a swig interface file for the module.
ftime-report
Modula-2
@@ -304,7 +304,7 @@ optimize non var unbounded parameters by
fuse-list=
Modula-2 Joined
-orders the initialization/finalizations for scaffold-static or force linking
of modules if scaffold-dynamic
+orders the initialization/finalizations for scaffold-static or force linking
of modules if scaffold-dynamic.
fversion
Modula-2
@@ -312,15 +312,15 @@ Modula-2
fwideset
Modula-2
-link against the module M2WIDESET to perform the wideset operator, the
negative version of this option will generate a warning if this module is
required
+link against the module M2WIDESET to perform the wideset operator, the
negative version of this option will generate a warning if this module is
required.
fwholediv
Modula-2
-turns on all division and modulus by zero checking for ordinal values
+turns on all division and modulus by zero checking for ordinal values.
fwholevalue
Modula-2
-turns on runtime checking to check whether a whole number will exceed range
+turns on runtime checking to check whether a whole number will exceed range.
static-libgm2
Driver
@@ -469,11 +469,11 @@ Modula-2 Alias(save-temps)
save-temps
Modula-2
-save temporary preprocessed files
+save temporary preprocessed files.
save-temps=
Modula-2 Joined
-save temporary preprocessed files
+save temporary preprocessed files.
traditional-cpp
Modula-2
Jakub