Document .opt Warning and Optimization flags

Joseph S. Myers joseph@codesourcery.com
Tue Nov 23 19:04:00 GMT 2010


doc/options.texi was missing documentation of the Warning and Optimization 
flags in .opt files.  This patch fixes this.  Tested with "make info" and 
"make pdf" and committed.

The only .opt flag now present in a .opt file but not documented in 
options.texi is InverseVar, used in mips.opt.  This is a flag that doesn't 
actually exist (nothing in the awk scripts handles it) so it's correct for 
it not to be documented; the bug is in the .opt file.  My guess is that 
the intent of InverseVar(MDMX) is Var(TARGET_MDMX, 0) - not that anything 
uses the TARGET_MDMX variable anyway.  Given the lack of error checking in 
the awk scripts, if anything it's a surprise there aren't more bogus .opt 
flags present.

Index: doc/options.texi
===================================================================
--- doc/options.texi	(revision 167088)
+++ doc/options.texi	(working copy)
@@ -340,6 +340,17 @@
 @item Report
 The state of the option should be printed by @option{-fverbose-asm}.
 
+@item Warning
+This is a warning option and should be shown as such in
+@option{--help} output.  This flag does not currently affect anything
+other than @option{--help}.
+
+@item Optimization
+This is an optimization option.  It should be shown as such in
+@option{--help} output, and any associated variable named using
+@code{Var} should be saved and restored when the optimization level is
+changed with @code{optimize} attributes.
+
 @item Undocumented
 The option is deliberately missing documentation and should not
 be included in the @option{--help} output.
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 167088)
+++ ChangeLog	(working copy)
@@ -1,3 +1,7 @@
+2010-11-23  Joseph Myers  <joseph@codesourcery.com>
+
+	* doc/options.texi (Warning, Optimization): Document.
+
 2010-11-23  Jan Hubicka  <jh@suse.cz>
 
 	* tree.h (DECL_HAS_IMPLICIT_SECTION_NAME_P): New macro.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list