Remove relics of C++ +e option

Joseph S. Myers joseph@codesourcery.com
Wed Jun 23 23:50:00 GMT 2010


According to cp/NEWS, an obsolete +e option was removed in GCC 2.95.
However, some relics of this option remain in the compiler, including
in particular in the option handling code in gcc.c.  This patch
removes those relics that I found.

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.  OK to
commit?

2010-06-23  Joseph Myers  <joseph@codesourcery.com>

	* gcc.c (translate_options): Don't mention +e in comment.
	(process_command): Don't handle +e specially.

cp:
2010-06-23  Joseph Myers  <joseph@codesourcery.com>

	* lang-specs.h: Remove +e handling.

objcp:
2010-06-23  Joseph Myers  <joseph@codesourcery.com>

	* lang-specs.h: Remove +e handling.

diff -rupN --exclude=.svn gcc-mainline-opt4/gcc/cp/lang-specs.h gcc-mainline/gcc/cp/lang-specs.h
--- gcc-mainline-opt4/gcc/cp/lang-specs.h	2010-06-04 02:30:27.000000000 -0700
+++ gcc-mainline/gcc/cp/lang-specs.h	2010-06-23 13:37:25.000000000 -0700
@@ -1,6 +1,6 @@
 /* Definitions for specs for C++.
    Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+   2001, 2002, 2003, 2004, 2007, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -47,7 +47,7 @@ along with GCC; see the file COPYING3.  
 		%(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\
       cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\
 	      %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
-	%(cc1_options) %2 %{+e1*}\
+	%(cc1_options) %2\
 	%{!fsyntax-only:%{!fdump-ada-spec*:-o %g.s %{!o*:--output-pch=%i.gch}\
         %W{o*:--output-pch=%*}}%V}}}}",
      CPLUSPLUS_CPP_SPEC, 0, 0},
@@ -58,11 +58,11 @@ along with GCC; see the file COPYING3.  
 		%(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\
       cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\
 	      %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
-	%(cc1_options) %2 %{+e1*}\
+	%(cc1_options) %2\
        %{!fsyntax-only:%(invoke_as)}}}}",
      CPLUSPLUS_CPP_SPEC, 0, 0},
   {".ii", "@c++-cpp-output", 0, 0, 0},
   {"@c++-cpp-output",
    "%{!M:%{!MM:%{!E:\
-    cc1plus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
+    cc1plus -fpreprocessed %i %(cc1_options) %2\
     %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
diff -rupN --exclude=.svn gcc-mainline-opt4/gcc/gcc.c gcc-mainline/gcc/gcc.c
--- gcc-mainline-opt4/gcc/gcc.c	2010-06-23 08:22:19.000000000 -0700
+++ gcc-mainline/gcc/gcc.c	2010-06-23 13:36:36.000000000 -0700
@@ -1468,7 +1468,7 @@ translate_options (int *argcp, const cha
 	    }
 	}
       else
-	/* Ordinary operands, or +e options.  */
+	/* Ordinary operands.  */
 	newv[newindex++] = argv[i++];
     }
 
@@ -3888,9 +3888,6 @@ process_command (int argc, const char **
 	  /* Record the part after the last comma.  */
 	  add_preprocessor_option (argv[i] + prev, j - prev);
 	}
-      else if (argv[i][0] == '+' && argv[i][1] == 'e')
-	/* The +e options to the C++ front-end.  */
-	n_switches++;
       else if (strncmp (argv[i], "-Wl,", 4) == 0)
 	{
 	  int j;
@@ -4349,19 +4346,6 @@ process_command (int argc, const char **
 	  target_system_root = argv[i] + strlen ("--sysroot=");
 	  target_system_root_changed = 1;
 	}
-      else if (argv[i][0] == '+' && argv[i][1] == 'e')
-	{
-	  /* Compensate for the +e options to the C++ front-end;
-	     they're there simply for cfront call-compatibility.  We do
-	     some magic in default_compilers to pass them down properly.
-	     Note we deliberately start at the `+' here, to avoid passing
-	     -e0 or -e1 down into the linker.  */
-	  switches[n_switches].part1 = &argv[i][0];
-	  switches[n_switches].args = 0;
-	  switches[n_switches].live_cond = 0;
-	  switches[n_switches].validated = 0;
-	  n_switches++;
-	}
       else if (strncmp (argv[i], "-Wl,", 4) == 0)
 	{
 	  int prev, j;
diff -rupN --exclude=.svn gcc-mainline-opt4/gcc/objcp/lang-specs.h gcc-mainline/gcc/objcp/lang-specs.h
--- gcc-mainline-opt4/gcc/objcp/lang-specs.h	2009-03-28 00:36:32.000000000 -0700
+++ gcc-mainline/gcc/objcp/lang-specs.h	2010-06-23 13:38:03.000000000 -0700
@@ -1,5 +1,5 @@
 /* Definitions for specs for Objective-C++.
-   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2010 Free Software Foundation, Inc.
    Contributed by Ziemowit Laski  <zlaski@apple.com>
 
 This file is part of GCC.
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3.  
 		%(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\
       cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\
 	      %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
-	%(cc1_options) %2 %{+e1*}\
+	%(cc1_options) %2\
         -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}",
      CPLUSPLUS_CPP_SPEC, 0, 0},
   {"@objective-c++",
@@ -46,15 +46,15 @@ along with GCC; see the file COPYING3.  
 		%(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\
       cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\
 	      %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
-	%(cc1_options) %2 %{+e1*}\
+	%(cc1_options) %2\
        %{!fsyntax-only:%(invoke_as)}}}}",
      CPLUSPLUS_CPP_SPEC, 0, 0},
   {".mii", "@objective-c++-cpp-output", 0, 0, 0},
   {"@objective-c++-cpp-output",
    "%{!M:%{!MM:%{!E:\
-    cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
+    cc1objplus -fpreprocessed %i %(cc1_options) %2\
     %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
   {"@objc++-cpp-output",
    "%{!M:%{!MM:%{!E:\
-    cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
+    cc1objplus -fpreprocessed %i %(cc1_options) %2\
     %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list