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]

[patch, fortran] Remove vestiges of non-working Q exponent.


At one time, gfortran apparently supported a quad-precision exponent character, 1.0Q0, controlled by a -qkind= option. It doesn't work, and doesn't look like it's worked in years; the option does nothing, and using 'Q' for an exponent causes an ICE. The attached patch removes all of the related code.

----------------------------------------------------------------------
2006-11-08  Brooks Moses  <brooks.moses@codesourcery.com>

	* lang.opt: Remove non-working -qkind= option.
	* gfortran.h (gfc_option_t): Remove q_kind member.
	* options.c (gfc_init_options): Remove q_kind initialization.
	(gfc_handle_option): Remove -qkind= option handling.
	* primary.c: (match_real_constant): Remove 'Q' exponent.

----------------------------------------------------------------------

Regression-tested on i686-pc-linux-gnu. Ok for trunk? (Since it fixes an ICE, should I apply it to 4.2 as well?)

- Brooks
Index: lang.opt
===================================================================
--- lang.opt	(revision 118541)
+++ lang.opt	(working copy)
@@ -201,10 +201,6 @@
 Fortran
 Treat the input file as preprocessed
 
-qkind=
-Fortran RejectNegative Joined UInteger
--qkind=<n>	Set the kind for a real with the 'q' exponent to 'n'
-
 ffpe-trap=
 Fortran RejectNegative JoinedOrMissing
 -ffpe-trap=[..]	Stop on following floating point exceptions
Index: gfortran.h
===================================================================
--- gfortran.h	(revision 118541)
+++ gfortran.h	(working copy)
@@ -1654,8 +1654,6 @@
   int flag_d_lines;
   int flag_openmp;
 
-  int q_kind;
-
   int fpe;
 
   int warn_std;
Index: options.c
===================================================================
--- options.c	(revision 118541)
+++ options.c	(working copy)
@@ -86,8 +86,6 @@
   gfc_option.flag_d_lines = -1;
   gfc_option.flag_openmp = 0;
 
-  gfc_option.q_kind = gfc_default_double_kind;
-
   gfc_option.fpe = 0;
 
   /* Argument pointers cannot point to anything
@@ -549,12 +547,6 @@
       gfc_option.max_identifier_length = value;
       break;
 
-    case OPT_qkind_:
-      if (gfc_validate_kind (BT_REAL, value, true) < 0)
-	gfc_fatal_error ("Argument to -fqkind isn't a valid real kind");
-      gfc_option.q_kind = value;
-      break;
-
     case OPT_fdefault_integer_8:
       gfc_option.flag_default_integer = value;
       break;
Index: primary.c
===================================================================
--- primary.c	(revision 118541)
+++ primary.c	(working copy)
@@ -580,16 +580,6 @@
       kind = gfc_default_double_kind;
       break;
 
-    case 'q':
-      if (kind != -2)
-	{
-	  gfc_error
-	    ("Real number at %C has a 'q' exponent and an explicit kind");
-	  goto cleanup;
-	}
-      kind = gfc_option.q_kind;
-      break;
-
     default:
       if (kind == -2)
 	kind = gfc_default_real_kind;

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