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]

[RFA] Remove -V


-V is broken yet again in 3.2; the cpp0 / cc1 interface has completely
changed, and C built-ins are moving from the driver to the front end.

As has been suggested before on the list, let's just remove it rather
than pretend it works.  I've not implemented the installation
changes that Joseph would like since I don't feel qualified to do so.

It also frees up -V to be used in the same manner as the GNU coding
standards say should be done.

OK to apply?

Neil.

	* gcc.c (SWITCH_TAKES_ARG): Remove 'V'.
	(translate_options): Remove 'V'.
	(process_command): Similarly.
doc:
	* invoke.texi: Remove documentation of 'V'.

Index: gcc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcc.c,v
retrieving revision 1.314
diff -u -p -r1.314 gcc.c
--- gcc.c	13 May 2002 05:57:22 -0000	1.314
+++ gcc.c	13 May 2002 06:32:18 -0000
@@ -745,8 +745,7 @@ static struct user_specs *user_specs_hea
   ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \
    || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \
    || (CHAR) == 'I' || (CHAR) == 'm' || (CHAR) == 'x' \
-   || (CHAR) == 'L' || (CHAR) == 'A' || (CHAR) == 'V' \
-   || (CHAR) == 'B' || (CHAR) == 'b')
+   || (CHAR) == 'L' || (CHAR) == 'A' || (CHAR) == 'B' || (CHAR) == 'b')
 
 #ifndef SWITCH_TAKES_ARG
 #define SWITCH_TAKES_ARG(CHAR) DEFAULT_SWITCH_TAKES_ARG(CHAR)
@@ -1185,7 +1184,7 @@ translate_options (argcp, argvp)
 	    nskip += SWITCH_TAKES_ARG (c) - (p[1] != 0);
 	  else if (WORD_SWITCH_TAKES_ARG (p))
 	    nskip += WORD_SWITCH_TAKES_ARG (p);
-	  else if ((c == 'B' || c == 'b' || c == 'V' || c == 'x')
+	  else if ((c == 'B' || c == 'b' || c == 'x')
 		   && p[1] == 0)
 	    nskip += 1;
 	  else if (! strcmp (p, "Xlinker"))
@@ -3606,48 +3605,6 @@ warranty; not even for MERCHANTABILITY o
 	      verbose_flag++;
 	      break;
 
-	    case 'V':
-	      n_switches++;
-	      if (p[1] == 0 && i + 1 == argc)
-		fatal ("argument to `-V' is missing");
-	      if (p[1] == 0)
-		spec_version = argv[++i];
-	      else
-		spec_version = p + 1;
-	      compiler_version = spec_version;
-	      warn_std_ptr = &warn_std;
-
-	      /* Validate the version number.  Use the same checks
-		 done when inserting it into a spec.
-
-		 The format of the version string is
-		 ([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)?  */
-	      {
-		const char *v = compiler_version;
-
-		/* Ignore leading non-digits.  i.e. "foo-" in "foo-2.7.2".  */
-		while (! ISDIGIT (*v))
-		  v++;
-
-		if (v > compiler_version && v[-1] != '-')
-		  fatal ("invalid version number format");
-
-		/* Set V after the first period.  */
-		while (ISDIGIT (*v))
-		  v++;
-
-		if (*v != '.')
-		  fatal ("invalid version number format");
-
-		v++;
-		while (ISDIGIT (*v))
-		  v++;
-
-		if (*v != 0 && *v != ' ' && *v != '.' && *v != '-')
-		  fatal ("invalid version number format");
-	      }
-	      break;
-
 	    case 'S':
 	    case 'c':
 	      if (p[1] == 0)
@@ -4005,7 +3962,7 @@ warranty; not even for MERCHANTABILITY o
 	  else
 	    {
 	      char ch = switches[n_switches].part1[0];
-	      if (ch == 'V' || ch == 'b' || ch == 'B')
+	      if (ch == 'b' || ch == 'B')
 		switches[n_switches].validated = 1;
 	    }
 	  n_switches++;
Index: doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.143
diff -u -p -r1.143 invoke.texi
--- doc/invoke.texi	11 May 2002 16:25:05 -0000	1.143
+++ doc/invoke.texi	13 May 2002 06:32:49 -0000
@@ -322,7 +322,7 @@ in the following sections.
 @c I wrote this xref this way to avoid overfull hbox. -- rms
 @xref{Target Options}.
 @gccoptlist{
--b @var{machine}  -V @var{version}}
+-b @var{machine}}
 
 @item Machine Dependent Options
 @xref{Submodel Options,,Hardware Models and Configurations}.
@@ -4756,40 +4756,26 @@ would specify @option{-b i386v} to run t
 
 When you do not specify @option{-b}, it normally means to compile for
 the same type of machine that you are using.
-
-@item -V @var{version}
-@opindex V
-The argument @var{version} specifies which version of GCC to run.
-This is useful when multiple versions are installed.  For example,
-@var{version} might be @samp{2.0}, meaning to run GCC version 2.0.
-
-The default version, when you do not specify @option{-V}, is the last
-version of GCC that you installed.
 @end table
 
-The @option{-b} and @option{-V} options actually work by controlling part of
+The @option{-b} option actually works by controlling part of
 the file name used for the executable files and libraries used for
 compilation.  A given version of GCC, for a given target machine, is
 normally kept in the directory @file{/usr/local/lib/gcc-lib/@var{machine}/@var{version}}.
 
-Thus, sites can customize the effect of @option{-b} or @option{-V} either by
+Thus, sites can customize the effect of @option{-b} either by
 changing the names of these directories or adding alternate names (or
 symbolic links).  If in directory @file{/usr/local/lib/gcc-lib/} the
 file @file{80386} is a link to the file @file{i386v}, then @option{-b
 80386} becomes an alias for @option{-b i386v}.
 
-In one respect, the @option{-b} or @option{-V} do not completely change
+In one respect, @option{-b} does not completely change
 to a different compiler: the top-level driver program @command{gcc}
 that you originally invoked continues to run and invoke the other
 executables (preprocessor, compiler per se, assembler and linker)
 that do the real work.  However, since no real work is done in the
 driver program, it usually does not matter that the driver program
-in use is not the one for the specified target.  It is common for the
-interface to the other executables to change incompatibly between
-compiler versions, so unless the version specified is very close to that
-of the driver (for example, @option{-V 3.0} with a driver program from GCC
-version 3.0.1), use of @option{-V} may not work; for example, using
-@option{-V 2.95.2} will not work with a driver program from GCC 3.0.
+in use is not the one for the specified target.
 
 The only way that the driver program depends on the target machine is
 in the parsing and handling of special machine-specific options.
@@ -4807,8 +4793,7 @@ different targets or versions, under dif
 For example, if the driver for version 2.0 is installed as @command{ogcc}
 and that for version 2.1 is installed as @command{gcc}, then the command
 @command{gcc} will use version 2.1 by default, while @command{ogcc} will use
-2.0 by default.  However, you can choose either version with either
-command with the @option{-V} option.
+2.0 by default.
 
 @node Submodel Options
 @section Hardware Models and Configurations


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