This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

More options to c.opt


And treelang/lang-options.h dies.

I'll fix exgettext in the not too distant future.

Neil.

	* c.opt: Document more options.
	* toplev.c (documented_lang_options): Remove all local help strings.
treelang:
	* lang-options.h: Remove.
	* lang.opt: Document some options.  Remove --help.
	* tree1.c (treelang_handle_option): Remove OPT__help case.

Index: c.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c.opt,v
retrieving revision 1.8
diff -u -p -r1.8 c.opt
--- c.opt	15 Jul 2003 05:48:15 -0000	1.8
+++ c.opt	15 Jul 2003 20:48:54 -0000
@@ -146,16 +146,19 @@ C++ ObjC++
 
 Wall
 C ObjC C++ ObjC++
-Enable most preprocessor warnings
+Enable most warning messages
 
 Wbad-function-cast
 C ObjC
+Warn about casting functions to incompatible types
 
 Wcast-qual
 C ObjC C++ ObjC++
+Warn about casts which discard qualifiers
 
 Wchar-subscripts
 C ObjC C++ ObjC++
+Warn about subscripts whose type is \"char\"
 
 Wcomment
 C ObjC C++ ObjC++
@@ -167,6 +170,7 @@ Synonym for -Wcomment
 
 Wconversion
 C ObjC C++ ObjC++
+Warn about possibly confusing type conversions
 
 Wctor-dtor-privacy
 C++ ObjC++
@@ -176,6 +180,7 @@ C++ ObjC++
 
 Wdiv-by-zero
 C ObjC
+Warn about compile-time integer division by zero
 
 Weffc++
 C++ ObjC++
@@ -190,24 +195,31 @@ C ObjC C++ ObjC++
 
 Werror-implicit-function-declaration
 C ObjC RejectNegative
+Make implicit function declarations an error
 
 Wfloat-equal
 C ObjC C++ ObjC++
+Warn if testing floating point numbers for equality
 
 Wformat
 C ObjC C++ ObjC++
+Warn about printf/scanf/strftime/strfmon format string anomalies
 
 Wformat-extra-args
 C ObjC C++ ObjC++
+Warn if passing too many arguments to a function for its format string
 
 Wformat-nonliteral
 C ObjC C++ ObjC++
+Warn about format strings that are not literals
 
 Wformat-security
 C ObjC C++ ObjC++
+Warn about possible security problems with format functions
 
 Wformat-y2k
 C ObjC C++ ObjC++
+Warn about strftime formats yielding 2-digit years
 
 Wformat-zero-length
 C ObjC
@@ -220,43 +232,54 @@ C ObjC C++ ObjC++
 
 Wimplicit-function-declaration
 C ObjC
+Warn about implicit function declarations
 
 Wimplicit-int
 C ObjC
+Warn when a declaration does not specify a type
 
 Wimport
 C ObjC C++ ObjC++
-Warn about uses of the #import directive
+Warn about uses of the \"#import\" directive
 
 Winvalid-offsetof
 C++ ObjC++
 
 Winvalid-pch
 C ObjC C++ ObjC++
+Warn about PCH files that are found but not used
 
 Wlong-long
 C ObjC C++ ObjC++
+Do not warn about using \"long long\" when -pedantic
 
 Wmain
 C ObjC
+Warn about suspicious declarations of \"main\"
 
 Wmissing-braces
 C ObjC C++ ObjC++
+Warn about possibly missing braces around initializers
 
 Wmissing-declarations
 C ObjC
+Warn about global functions without previous declarations
 
 Wmissing-format-attribute
 C ObjC C++ ObjC++
+Warn about functions which might be candidates for format attributes
 
 Wmissing-prototypes
 C ObjC
+Warn about global functions without prototypes
 
 Wmultichar
 C ObjC C++ ObjC++
+Warn about use of multi-character character constants
 
 Wnested-externs
 C ObjC
+Warn about \"extern\" declarations not at file scope
 
 Wnon-template-friend
 C++ ObjC++
@@ -275,39 +298,46 @@ C++ ObjC++
 
 Wparentheses
 C ObjC C++ ObjC++
+Warn about possibly missing parentheses
 
 Wpmf-conversions
 C++ ObjC++
 
 Wpointer-arith
 C ObjC C++ ObjC++
+Warn about function pointer arithmetic
 
 Wprotocol
 ObjC ObjC++
 
 Wredundant-decls
 C ObjC C++ ObjC++
+Warn about multiple declarations of the same object
 
 Wreorder
 C++ ObjC++
 
 Wreturn-type
 C ObjC C++ ObjC++
+Warn whenever a function's return type defaults to \"int\"
 
 Wselector
 ObjC ObjC++
 
 Wsequence-point
 C ObjC
+Warn about possible violations of sequence point rules
 
 Wsign-compare
 C ObjC C++ ObjC++
+Warn about signed-unsigned comparisons
 
 Wsign-promo
 C++ ObjC++
 
 Wstrict-prototypes
 C ObjC
+Warn about unprototyped function declarations
 
 Wsynth
 C++ ObjC++
@@ -333,6 +363,7 @@ Warn if an undefined macro is used in an
 
 Wunknown-pragmas
 C ObjC C++ ObjC++
+Warn about unrecognized pragmas
 
 Wunused-macros
 C ObjC C++ ObjC++
@@ -340,9 +371,11 @@ Warn about macros defined in the main fi
 
 Wwrite-strings
 C ObjC C++ ObjC++
+Give strings the type \"array of char\"
 
 ansi
 C ObjC C++ ObjC++
+A synonym for -std=c89.  In a future version of GCC it will become synonymous with -std=c99 instead
 
 d
 C ObjC C++ ObjC++ Joined
@@ -362,9 +395,11 @@ C++ ObjC++
 
 fasm
 C ObjC C++ ObjC++
+Recognize the \"asm\" keyword
 
 fbuiltin
 C ObjC C++ ObjC++
+Recognize built-in functions
 
 fbuiltin-
 C ObjC C++ ObjC++ Joined
@@ -374,6 +409,7 @@ C++ ObjC++
 
 fcond-mismatch
 C ObjC C++ ObjC++
+Allow the arguments of the '?' operator to have different types
 
 fconserve-space
 C++ ObjC++
@@ -421,6 +457,7 @@ C++ ObjC++
 
 ffreestanding
 C ObjC
+Do not assume that standard C libraries and \"main\" exist
 
 fgnu-keywords
 C++ ObjC++
@@ -439,6 +476,7 @@ C++ ObjC++
 
 fhosted
 C ObjC
+Assume normal C execution environment
 
 fhuge-objects
 C++ ObjC++
@@ -497,21 +535,26 @@ C++ ObjC++
 
 fshort-double
 C ObjC C++ ObjC++
+Use the same size for double as for float
 
 fshort-enums
 C ObjC C++ ObjC++
+Use the narrowest integer type possible for enumeration types
 
 fshort-wchar
 C ObjC C++ ObjC++
+Force the underlying type for \"wchar_t\" to be \"unsigned short\"
 
 fshow-column
 C ObjC C++ ObjC++
 
 fsigned-bitfields
 C ObjC C++ ObjC++
+When \"signed\" or \"unsigned\" is not given make the bitfield signed
 
 fsigned-char
 C ObjC C++ ObjC++
+Make \"char\" signed by default
 
 fsquangle
 C++ ObjC++
@@ -534,9 +577,11 @@ C++ ObjC++
 
 funsigned-bitfields
 C ObjC C++ ObjC++
+When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
 
 funsigned-char
 C ObjC C++ ObjC++
+Make \"char\" unsigned by default
 
 fuse-cxa-atexit
 C++ ObjC++
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.807
diff -u -p -r1.807 toplev.c
--- toplev.c	13 Jul 2003 20:31:32 -0000	1.807
+++ toplev.c	15 Jul 2003 20:48:56 -0000
@@ -1188,172 +1188,6 @@ static const struct lang_opt
 }
 documented_lang_options[] =
 {
-  /* In order not to overload the --help output, the convention
-     used here is to only describe those options which are not
-     enabled by default.  */
-
-  { "-ansi",
-    N_("Compile just for ISO C90") },
-  { "-std= ",
-    N_("Determine language standard") },
-
-  { "-fsigned-bitfields", "" },
-  { "-funsigned-bitfields",
-    N_("Make bit-fields by unsigned by default") },
-  { "-fno-signed-bitfields", "" },
-  { "-fno-unsigned-bitfields","" },
-  { "-fsigned-char",
-    N_("Make 'char' be signed by default") },
-  { "-funsigned-char",
-    N_("Make 'char' be unsigned by default") },
-  { "-fno-signed-char", "" },
-  { "-fno-unsigned-char", "" },
-
-  { "-fasm", "" },
-  { "-fno-asm",
-    N_("Do not recognize the 'asm' keyword") },
-  { "-fbuiltin", "" },
-  { "-fno-builtin",
-    N_("Do not recognize any built in functions") },
-  { "-fhosted",
-    N_("Assume normal C execution environment") },
-  { "-fno-hosted", "" },
-  { "-ffreestanding",
-    N_("Assume that standard libraries & main might not exist") },
-  { "-fno-freestanding", "" },
-  { "-fcond-mismatch",
-    N_("Allow different types as args of ? operator") },
-  { "-fno-cond-mismatch", "" },
-  { "-fdollars-in-identifiers",
-    N_("Allow the use of $ inside identifiers") },
-  { "-fno-dollars-in-identifiers", "" },
-  { "-fpreprocessed", "" },
-  { "-fno-preprocessed", "" },
-  { "-fshort-double",
-    N_("Use the same size for double as for float") },
-  { "-fno-short-double", "" },
-  { "-fshort-enums",
-    N_("Use the smallest fitting integer to hold enums") },
-  { "-fno-short-enums", "" },
-  { "-fshort-wchar",
-    N_("Override the underlying type for wchar_t to `unsigned short'") },
-  { "-fno-short-wchar", "" },
-
-  { "-Wall",
-    N_("Enable most warning messages") },
-  { "-Wbad-function-cast",
-    N_("Warn about casting functions to incompatible types") },
-  { "-Wno-bad-function-cast", "" },
-  { "-Wmissing-format-attribute",
-    N_("Warn about functions which might be candidates for format attributes") },
-  { "-Wno-missing-format-attribute", "" },
-  { "-Wcast-qual",
-    N_("Warn about casts which discard qualifiers") },
-  { "-Wno-cast-qual", "" },
-  { "-Wchar-subscripts",
-    N_("Warn about subscripts whose type is 'char'") },
-  { "-Wno-char-subscripts", "" },
-  { "-Wcomment",
-    N_("Warn if nested comments are detected") },
-  { "-Wno-comment", "" },
-  { "-Wcomments",
-    N_("Warn if nested comments are detected") },
-  { "-Wno-comments", "" },
-  { "-Wconversion",
-    N_("Warn about possibly confusing type conversions") },
-  { "-Wno-conversion", "" },
-  { "-Wdiv-by-zero", "" },
-  { "-Wno-div-by-zero",
-    N_("Do not warn about compile-time integer division by zero") },
-  { "-Wfloat-equal",
-    N_("Warn about testing equality of floating point numbers") },
-  { "-Wno-float-equal", "" },
-  { "-Wformat",
-    N_("Warn about printf/scanf/strftime/strfmon format anomalies") },
-  { "-Wno-format", "" },
-  { "-Wformat-extra-args", "" },
-  { "-Wno-format-extra-args",
-    N_("Don't warn about too many arguments to format functions") },
-  { "-Wformat-nonliteral",
-    N_("Warn about non-string-literal format strings") },
-  { "-Wno-format-nonliteral", "" },
-  { "-Wformat-security",
-    N_("Warn about possible security problems with format functions") },
-  { "-Wno-format-security", "" },
-  { "-Wformat-y2k", "" },
-  { "-Wno-format-y2k",
-    N_("Don't warn about strftime formats yielding 2 digit years") },
-  { "-Wimplicit-function-declaration",
-    N_("Warn about implicit function declarations") },
-  { "-Wno-implicit-function-declaration", "" },
-  { "-Werror-implicit-function-declaration", "" },
-  { "-Wimplicit-int",
-    N_("Warn when a declaration does not specify a type") },
-  { "-Wno-implicit-int", "" },
-  { "-Wimplicit", "" },
-  { "-Wno-implicit", "" },
-  { "-Wimport",
-    N_("Warn about the use of the #import directive") },
-  { "-Wno-import", "" },
-  { "-Winvalid-pch",
-    N_("Warn about PCH files that are found but not used") },
-  { "-Wlong-long","" },
-  { "-Wno-long-long",
-    N_("Do not warn about using 'long long' when -pedantic") },
-  { "-Wmain",
-    N_("Warn about suspicious declarations of main") },
-  { "-Wno-main", "" },
-  { "-Wmissing-braces",
-    N_("Warn about possibly missing braces around initializers") },
-  { "-Wno-missing-braces", "" },
-  { "-Wmissing-declarations",
-    N_("Warn about global funcs without previous declarations") },
-  { "-Wno-missing-declarations", "" },
-  { "-Wmissing-prototypes",
-    N_("Warn about global funcs without prototypes") },
-  { "-Wno-missing-prototypes", "" },
-  { "-Wmultichar",
-    N_("Warn about use of multicharacter literals") },
-  { "-Wno-multichar", "" },
-  { "-Wnested-externs",
-    N_("Warn about externs not at file scope level") },
-  { "-Wno-nested-externs", "" },
-  { "-Wparentheses",
-    N_("Warn about possible missing parentheses") },
-  { "-Wno-parentheses", "" },
-  { "-Wpointer-arith",
-    N_("Warn about function pointer arithmetic") },
-  { "-Wno-pointer-arith", "" },
-  { "-Wredundant-decls",
-    N_("Warn about multiple declarations of the same object") },
-  { "-Wno-redundant-decls", "" },
-  { "-Wreturn-type",
-    N_("Warn whenever a function's return-type defaults to int") },
-  { "-Wno-return-type", "" },
-  { "-Wsequence-point",
-    N_("Warn about possible violations of sequence point rules") },
-  { "-Wno-sequence-point", "" },
-  { "-Wsign-compare",
-    N_("Warn about signed/unsigned comparisons") },
-  { "-Wno-sign-compare", "" },
-  { "-Wstrict-prototypes",
-    N_("Warn about non-prototyped function decls") },
-  { "-Wno-strict-prototypes", "" },
-  { "-Wtraditional",
-    N_("Warn about constructs whose meanings change in ISO C") },
-  { "-Wno-traditional", "" },
-  { "-Wtrigraphs",
-    N_("Warn when trigraphs are encountered") },
-  { "-Wno-trigraphs", "" },
-  { "-Wundef", "" },
-  { "-Wno-undef", "" },
-  { "-Wunknown-pragmas",
-    N_("Warn about unrecognized pragmas") },
-  { "-Wno-unknown-pragmas", "" },
-  { "-Wwrite-strings",
-    N_("Mark strings as 'const char *'") },
-  { "-Wno-write-strings", "" },
-
 #define DEFINE_LANG_NAME(NAME) { NULL, NAME },
 
 #include "options_.h"
Index: treelang/lang-options.h
===================================================================
RCS file: treelang/lang-options.h
diff -N treelang/lang-options.h
--- treelang/lang-options.h	5 May 2002 04:24:18 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-/* Definitions for switches for TREELANG.
-
-   Copyright (C) 1995, 96-98, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-DEFINE_LANG_NAME ("treelang")
-     
-/* This is the contribution to the `lang_options' array in gcc.c for
-   treelang.  */
- {"-fparser-trace", N_("(debug) trace parsing process")},
- {"-flexer-trace", N_("(debug) trace lexical analysis")},
-
-
Index: treelang/lang.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/treelang/lang.opt,v
retrieving revision 1.2
diff -u -p -r1.2 lang.opt
--- treelang/lang.opt	15 Jun 2003 14:56:32 -0000	1.2
+++ treelang/lang.opt	15 Jul 2003 20:48:58 -0000
@@ -25,14 +25,13 @@
 Language
 Treelang
 
--help
-Treelang
-
 flexer-trace
 Treelang
+Trace lexical analysis
 
 fparser-trace
 Treelang
+Trace the parsing process
 
 v
 Treelang
Index: treelang/tree1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/treelang/tree1.c,v
retrieving revision 1.14
diff -u -p -r1.14 tree1.c
--- treelang/tree1.c	10 Jul 2003 20:43:48 -0000	1.14
+++ treelang/tree1.c	15 Jul 2003 20:48:58 -0000
@@ -108,17 +108,6 @@ treelang_handle_option (size_t scode, co
     default:
       abort();
 
-    case OPT__help:
-      if (!version_done)
-	{
-	  fputs (language_string, stdout);
-	  fputs (version_string, stdout);
-	  fputs ("\n", stdout);
-	  version_done = 1;
-	}
-      fprintf (stdout, "Usage: tree1 [switches] -o output input\n");
-      break;
-
     case OPT_v:
       if (!version_done)
 	{


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]