OSDN Git Service

PR fortran/36031
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 May 2009 16:11:11 +0000 (16:11 +0000)
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 May 2009 16:11:11 +0000 (16:11 +0000)
* decl.c (set_enum_kind): Use global short-enums flag.
* gfortran.h (gfc_option_t): Remove short_enums flag.
* lang.opt (-fshort-enums): Refer to C documentation.
* options.c (gfc_init_options, gfc_handle_option): Use global
short-enums flag.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147615 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/decl.c
gcc/fortran/gfortran.h
gcc/fortran/lang.opt
gcc/fortran/options.c

index a5261b8..7ecb921 100644 (file)
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "gfortran.h"
 #include "match.h"
 #include "parse.h"
+#include "flags.h"
 
 
 /* Macros to access allocate memory for gfc_data_variable,
@@ -5295,7 +5296,7 @@ set_enum_kind(void)
   if (max_enum == NULL || enum_history == NULL)
     return;
 
-  if (!gfc_option.fshort_enums)
+  if (!flag_short_enums)
     return;
 
   i = 0;
index bc066bc..b38af18 100644 (file)
@@ -2060,7 +2060,6 @@ typedef struct
 
   int warn_std;
   int allow_std;
-  int fshort_enums;
   int convert;
   int record_marker;
   int max_subrecord_length;
index 9da290c..d29ddde 100644 (file)
@@ -350,7 +350,7 @@ Append a second underscore if the name already contains an underscore
 
 fshort-enums
 Fortran
-Use the narrowest integer type possible for enumeration types
+; Documented in C
 
 fsign-zero
 Fortran
index 65841f6..2d899f5 100644 (file)
@@ -137,7 +137,7 @@ gfc_init_options (unsigned int argc, const char **argv)
   set_default_std_flags ();
 
   /* -fshort-enums can be default on some targets.  */
-  gfc_option.fshort_enums = targetm.default_short_enums ();
+  flag_short_enums = targetm.default_short_enums ();
 
   /* Initialize cpp-related options.  */
   gfc_cpp_init_options(argc, argv);
@@ -858,7 +858,7 @@ gfc_handle_option (size_t scode, const char *arg, int value)
       break;
 
     case OPT_fshort_enums:
-      gfc_option.fshort_enums = 1;
+      flag_short_enums = 1;
       break;
 
     case OPT_fconvert_little_endian: