]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Documentation for -fident and -Qy/-Qn options [PR122243]
authorSandra Loosemore <sloosemore@baylibre.com>
Thu, 30 Oct 2025 00:56:22 +0000 (00:56 +0000)
committerSandra Loosemore <sloosemore@baylibre.com>
Mon, 10 Nov 2025 18:02:07 +0000 (18:02 +0000)
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.

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
gcc/doc/invoke.texi

index cb8732d9336cbf5c72aa2f679e3284506459bd2f..9bc0c65c45700161afd55ecb97de50158b10ad5c 100644 (file)
@@ -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
index 887a54e947e295e823aa86d1044ae684193f20e6..e1a8134c106405dad5cd0727821133f41954a412 100644 (file)
@@ -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