aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2009-05-14 21:29:48 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2009-05-14 21:29:48 +0000
commit09639a839744ebc53f6b221a8a3b57dbb9993f64 (patch)
tree3f13a6a041d6d3c9f9c6dd243c2fffd5baa391b8 /gcc/fortran
parentc04a56bffe53119ac0745f1c86df0c488e447989 (diff)
downloadgcc-09639a839744ebc53f6b221a8a3b57dbb9993f64.zip
gcc-09639a839744ebc53f6b221a8a3b57dbb9993f64.tar.gz
gcc-09639a839744ebc53f6b221a8a3b57dbb9993f64.tar.bz2
passes.c (finish_optimization_passes): Change i to int.
./: * passes.c (finish_optimization_passes): Change i to int. * plugin.c (plugins_active_p): Change event to int. (dump_active_plugins): Likewise. * reginfo.c (invalid_mode_change_p): Change to to unsigned int. Add cast. * tree.c (tree_range_check_failed): Change c to unsigned int. (omp_clause_range_check_failed): Likewise. (build_common_builtin_nodes): Change mode to int. Add cast. * config/ia64/ia64.c (is_emitted): Change r to unsigned int. (ia64_hard_regno_rename_ok, ia64_eh_uses): Likewise. * c-typeck.c (build_unary_op): If -Wc++-compat, warn about using ++ or -- with a variable of enum type. cp/: * class.c (layout_class_type): Change itk to unsigned int. * decl.c (finish_enum): Change itk to unsigned int. * parser.c (cp_parser_check_decl_spec): Change ds to int. Remove casts. fortran/: * decl.c (match_attr_spec): Change d to unsigned int. * dump-parse-tree.c (show_namespace): Change op to int. Add cast. * interface.c (gfc_check_interfaces): Change i to int. Add casts. * module.c (read_module): Change i to int. Add cast. (write_module): Change i to int. * symbol.c (gfc_get_namespace): Change in to int. (gfc_free_namespace): Change i to int. * trans-io.c (gfc_build_io_library_fndecls): Change ptype to unsigned int. Add cast. * trans-types.c (gfc_init_kinds): Change mode to unsigned int. Add casts. testsuite/: * gcc.dg/Wcxx-compat-9.c: New testcase. From-SVN: r147544
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog14
-rw-r--r--gcc/fortran/decl.c2
-rw-r--r--gcc/fortran/dump-parse-tree.c6
-rw-r--r--gcc/fortran/interface.c6
-rw-r--r--gcc/fortran/module.c6
-rw-r--r--gcc/fortran/symbol.c5
-rw-r--r--gcc/fortran/trans-io.c4
-rw-r--r--gcc/fortran/trans-types.c9
8 files changed, 33 insertions, 19 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 864b095..5871239 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,17 @@
+2009-05-14 Ian Lance Taylor <iant@google.com>
+
+ * decl.c (match_attr_spec): Change d to unsigned int.
+ * dump-parse-tree.c (show_namespace): Change op to int. Add cast.
+ * interface.c (gfc_check_interfaces): Change i to int. Add casts.
+ * module.c (read_module): Change i to int. Add cast.
+ (write_module): Change i to int.
+ * symbol.c (gfc_get_namespace): Change in to int.
+ (gfc_free_namespace): Change i to int.
+ * trans-io.c (gfc_build_io_library_fndecls): Change ptype to
+ unsigned int. Add cast.
+ * trans-types.c (gfc_init_kinds): Change mode to unsigned int.
+ Add casts.
+
2009-05-14 Daniel Kraft <d@domob.eu>
PR fortran/40045
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 6c6fa45..a5261b8 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -2815,7 +2815,7 @@ match_attr_spec (void)
locus start, seen_at[NUM_DECL];
int seen[NUM_DECL];
- decl_types d;
+ unsigned int d;
const char *attr;
match m;
gfc_try t;
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index e595e7f..26a8e08 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -1,5 +1,5 @@
/* Parse tree dumper
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Steven Bosscher
@@ -1971,7 +1971,7 @@ show_namespace (gfc_namespace *ns)
{
gfc_interface *intr;
gfc_namespace *save;
- gfc_intrinsic_op op;
+ int op;
gfc_equiv *eq;
int i;
@@ -2021,7 +2021,7 @@ show_namespace (gfc_namespace *ns)
show_indent ();
fprintf (dumpfile, "Operator interfaces for %s:",
- gfc_op2string (op));
+ gfc_op2string ((gfc_intrinsic_op) op));
for (; intr; intr = intr->next)
fprintf (dumpfile, " %s", intr->sym->name);
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index ee1f528..f2d1465 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -1175,7 +1175,7 @@ gfc_check_interfaces (gfc_namespace *ns)
{
gfc_namespace *old_ns, *ns2;
char interface_name[100];
- gfc_intrinsic_op i;
+ int i;
old_ns = gfc_current_ns;
gfc_current_ns = ns;
@@ -1193,12 +1193,12 @@ gfc_check_interfaces (gfc_namespace *ns)
strcpy (interface_name, "intrinsic assignment operator");
else
sprintf (interface_name, "intrinsic '%s' operator",
- gfc_op2string (i));
+ gfc_op2string ((gfc_intrinsic_op) i));
if (check_interface0 (ns->op[i], interface_name))
continue;
- check_operator_interface (ns->op[i], i);
+ check_operator_interface (ns->op[i], (gfc_intrinsic_op) i);
for (ns2 = ns; ns2; ns2 = ns2->parent)
{
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 4221c04..2a48f88 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -4017,7 +4017,7 @@ read_module (void)
module_locus operator_interfaces, user_operators;
const char *p;
char name[GFC_MAX_SYMBOL_LEN + 1];
- gfc_intrinsic_op i;
+ int i;
int ambiguous, j, nuse, symbol;
pointer_info *info, *q;
gfc_use_rename *u;
@@ -4225,7 +4225,7 @@ read_module (void)
if (only_flag)
{
- u = find_use_operator (i);
+ u = find_use_operator ((gfc_intrinsic_op) i);
if (u == NULL)
{
@@ -4677,7 +4677,7 @@ write_symtree (gfc_symtree *st)
static void
write_module (void)
{
- gfc_intrinsic_op i;
+ int i;
/* Write the operator interfaces. */
mio_lparen ();
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index 67240ad..81473a4 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -2197,7 +2197,7 @@ gfc_get_namespace (gfc_namespace *parent, int parent_types)
{
gfc_namespace *ns;
gfc_typespec *ts;
- gfc_intrinsic_op in;
+ int in;
int i;
ns = XCNEW (gfc_namespace);
@@ -3088,7 +3088,7 @@ void
gfc_free_namespace (gfc_namespace *ns)
{
gfc_namespace *p, *q;
- gfc_intrinsic_op i;
+ int i;
if (ns == NULL)
return;
@@ -4494,4 +4494,3 @@ gfc_get_tbp_symtree (gfc_symtree **root, const char *name)
return result;
}
-
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
index 24f156e..0acf632 100644
--- a/gcc/fortran/trans-io.c
+++ b/gcc/fortran/trans-io.c
@@ -279,7 +279,7 @@ gfc_build_io_library_fndecls (void)
tree gfc_intio_type_node;
tree parm_type, dt_parm_type;
HOST_WIDE_INT pad_size;
- enum ioparam_type ptype;
+ unsigned int ptype;
types[IOPARM_type_int4] = gfc_int4_type_node = gfc_get_int_type (4);
types[IOPARM_type_intio] = gfc_intio_type_node
@@ -302,7 +302,7 @@ gfc_build_io_library_fndecls (void)
TYPE_ALIGN (gfc_get_int_type (gfc_intio_kind)));
for (ptype = IOPARM_ptype_common; ptype < IOPARM_ptype_num; ptype++)
- gfc_build_st_parameter (ptype, types);
+ gfc_build_st_parameter ((enum ioparam_type) ptype, types);
/* Define the transfer functions. */
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
index 694d0e2..ae72e8d 100644
--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -252,7 +252,7 @@ void init_c_interop_kinds (void)
void
gfc_init_kinds (void)
{
- enum machine_mode mode;
+ unsigned int mode;
int i_index, r_index, kind;
bool saw_i4 = false, saw_i8 = false;
bool saw_r4 = false, saw_r8 = false, saw_r16 = false;
@@ -261,7 +261,7 @@ gfc_init_kinds (void)
{
int kind, bitsize;
- if (!targetm.scalar_mode_supported_p (mode))
+ if (!targetm.scalar_mode_supported_p ((enum machine_mode) mode))
continue;
/* The middle end doesn't support constants larger than 2*HWI.
@@ -309,12 +309,13 @@ gfc_init_kinds (void)
for (r_index = 0, mode = MIN_MODE_FLOAT; mode <= MAX_MODE_FLOAT; mode++)
{
- const struct real_format *fmt = REAL_MODE_FORMAT (mode);
+ const struct real_format *fmt =
+ REAL_MODE_FORMAT ((enum machine_mode) mode);
int kind;
if (fmt == NULL)
continue;
- if (!targetm.scalar_mode_supported_p (mode))
+ if (!targetm.scalar_mode_supported_p ((enum machine_mode) mode))
continue;
/* Only let float/double/long double go through because the fortran