On Sat, Nov 8, 2025 at 10:08 PM Sandra Loosemore
<[email protected]> wrote:
>
> I noticed that the comments for -fident in common.opt were garbled,
> and its description is confusing; this is classed as a code generation
> option rather than a preprocessor option, and it controls emission of all
> ".ident" directives in the assembly file, not just those inserted by the
> "#ident" preprocessor directive. Also, the -Qy/-Qn options which have the
> same effect as -fident/-fno-ident were documented as System V Options when
> in fact they are available on all targets. Fixed thusly.
OK.
Thanks,
Richard.
> gcc/ChangeLog
> PR other/122243
> * common.opt: Clean up comments/documentation for -fident.
> * doc/invoke.texi: Move -Qy/-Qn documentation from System V options
> and combine with -fident/-fno-ident entry.
> ---
> gcc/common.opt | 8 +++-----
> gcc/doc/invoke.texi | 24 +++++++++++-------------
> 2 files changed, 14 insertions(+), 18 deletions(-)
>
> diff --git a/gcc/common.opt b/gcc/common.opt
> index cb8732d9336..9bc0c65c457 100644
> --- a/gcc/common.opt
> +++ b/gcc/common.opt
> @@ -1992,13 +1992,11 @@ Enum(hardcfr_check_noreturn_calls) String(no-xthrow)
> Value(HCFRNR_NO_XTHROW)
> EnumValue
> Enum(hardcfr_check_noreturn_calls) String(always) Value(HCFRNR_ALWAYS)
>
> -; Nonzero means ignore `#ident' directives. 0 means handle them.
> -; Generate position-independent code for executables if possible
> -; On SVR4 targets, it also controls whether or not to emit a
> -; string identifying the compiler.
> +; Nonzero means do not emit .ident assembler directives and ignore
> +; `#ident' preprocessor directives.
> fident
> Common Var(flag_no_ident,0)
> -Process #ident directives.
> +Emit .ident assembler directives.
>
> fif-conversion
> Common Var(flag_if_conversion) Optimization
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 887a54e947e..e1a8134c106 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -821,7 +821,8 @@ Objective-C and Objective-C++ Dialects}.
> -ftrapv -fwrapv
> -fvisibility=@r{[}default@r{|}internal@r{|}hidden@r{|}protected@r{]}
> -fstrict-volatile-bitfields -fsync-libcalls
> --fzero-init-padding-bits=@var{value}}
> +-fzero-init-padding-bits=@var{value}
> +-Qy -Qn}
>
> @item Developer Options
> @xref{Developer Options,,GCC Developer Options}.
> @@ -1499,7 +1500,7 @@ See RS/6000 and PowerPC Options.
> -mfix-at697f -mfix-ut699 -mfix-ut700 -mfix-gr712rc}
>
> @emph{System V Options} (@ref{System V Options})
> -@gccoptlist{-Qy -Qn -YP,@var{paths} -Ym,@var{dir}}
> +@gccoptlist{-YP,@var{paths} -Ym,@var{dir}}
>
> @emph{V850 Options} (@ref{V850 Options})
> @gccoptlist{-mlong-calls -mno-long-calls -mep -mno-ep
> @@ -20485,8 +20486,15 @@ useful to enable legacy code to link without errors.
>
> @opindex fno-ident
> @opindex fident
> +@opindex Qy
> +@opindex Qn
> @item -fno-ident
> -Ignore the @code{#ident} directive.
> +@itemx -Qy
> +@itemx -Qn
> +@option{-fno-ident} suppresses emission of @code{.ident} assembler
> +directives and causes the @code{#ident} preprocessor directive to be ignored.
> +@option{-Qy} and @option{-Qn} are obsolete synonyms for @option{-fident}
> +and @option{-fno-ident}, respectively.
>
> @opindex finhibit-size-directive
> @item -finhibit-size-directive
> @@ -34785,16 +34793,6 @@ compatibility with other compilers on those systems:
> Create a shared object.
> It is recommended that @option{-symbolic} or @option{-shared} be used
> instead.
>
> -@opindex Qy
> -@item -Qy
> -Identify the versions of each tool used by the compiler, in a
> -@code{.ident} assembler directive in the output.
> -
> -@opindex Qn
> -@item -Qn
> -Refrain from adding @code{.ident} directives to the output file (this is
> -the default).
> -
> @opindex YP
> @item -YP,@var{dirs}
> Search the directories @var{dirs}, and no others, for libraries
> --
> 2.39.5
>