summaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-19 16:22:12 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-19 16:22:12 +0000
commitdcb1b019e865f2ed8c7161b54dcf438477ab6e6b (patch)
treeeed351bb3b2763a12eff13217ad87938370c269c /gcc/fortran/module.c
parent41694d7cb8dc338c3a33248b1429ae94648aa3ab (diff)
downloadgcc-dcb1b019e865f2ed8c7161b54dcf438477ab6e6b.tar.gz
* gfortran.h (operator): Remove macro.
(gfc_namespace, gfc_expr): Avoid C++ keywords. * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3): Likewise. * decl.c (access_attr_decl): Likewise. * dependency.c (gfc_dep_compare_expr): Likewise. * dump-parse-tree.c (show_expr, show_uop, show_namespace): Likewise. * expr.c (gfc_copy_expr, gfc_type_convert_binary, simplify_intrinsic_op, check_intrinsic_op): Likewise. * interface.c (fold_unary, gfc_match_generic_spec, gfc_match_interface, gfc_match_end_interface, check_operator_interface, check_uop_interfaces, gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign, gfc_add_interface, gfc_current_interface_head, gfc_set_current_interface_head): Likewise. * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul): Likewise. * matchexp.c (gfc_get_parentheses, build_node): Likewise. * module.c (gfc_use_rename, gfc_match_use, find_use_name_n, number_use_names, mio_expr, load_operator_interfaces, read_module, write_operator, write_module): Likewise. * openmp.c (resolve_omp_atomic): Likewise. * resolve.c (resolve_operator, gfc_resolve_character_operator, gfc_resolve_uops): Likewise. * symbol.c (free_uop_tree, gfc_free_namespace): Likewise. * trans-expr.c (gfc_conv_expr_op): Likewise. * trans-openmp.c (gfc_trans_omp_atomic): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137981 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 9e9e7680f81..3f27fda26d4 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -169,7 +169,7 @@ typedef struct gfc_use_rename
char local_name[GFC_MAX_SYMBOL_LEN + 1], use_name[GFC_MAX_SYMBOL_LEN + 1];
struct gfc_use_rename *next;
int found;
- gfc_intrinsic_op operator;
+ gfc_intrinsic_op op;
locus where;
}
gfc_use_rename;
@@ -504,7 +504,7 @@ gfc_match_use (void)
char name[GFC_MAX_SYMBOL_LEN + 1], module_nature[GFC_MAX_SYMBOL_LEN + 1];
gfc_use_rename *tail = NULL, *new;
interface_type type, type2;
- gfc_intrinsic_op operator;
+ gfc_intrinsic_op op;
match m;
specified_int = false;
@@ -593,8 +593,8 @@ gfc_match_use (void)
/* See what kind of interface we're dealing with. Assume it is
not an operator. */
- new->operator = INTRINSIC_NONE;
- if (gfc_match_generic_spec (&type, name, &operator) == MATCH_ERROR)
+ new->op = INTRINSIC_NONE;
+ if (gfc_match_generic_spec (&type, name, &op) == MATCH_ERROR)
goto cleanup;
switch (type)
@@ -614,7 +614,7 @@ gfc_match_use (void)
goto cleanup;
if (type == INTERFACE_USER_OP)
- new->operator = INTRINSIC_USER;
+ new->op = INTRINSIC_USER;
if (only_flag)
{
@@ -623,7 +623,7 @@ gfc_match_use (void)
else
{
strcpy (new->local_name, name);
- m = gfc_match_generic_spec (&type2, new->use_name, &operator);
+ m = gfc_match_generic_spec (&type2, new->use_name, &op);
if (type != type2)
goto syntax;
if (m == MATCH_NO)
@@ -638,7 +638,7 @@ gfc_match_use (void)
goto syntax;
strcpy (new->local_name, name);
- m = gfc_match_generic_spec (&type2, new->use_name, &operator);
+ m = gfc_match_generic_spec (&type2, new->use_name, &op);
if (type != type2)
goto syntax;
if (m == MATCH_NO)
@@ -657,7 +657,7 @@ gfc_match_use (void)
break;
case INTERFACE_INTRINSIC_OP:
- new->operator = operator;
+ new->op = op;
break;
default:
@@ -698,8 +698,8 @@ find_use_name_n (const char *name, int *inst, bool interface)
for (u = gfc_rename_list; u; u = u->next)
{
if (strcmp (u->use_name, name) != 0
- || (u->operator == INTRINSIC_USER && !interface)
- || (u->operator != INTRINSIC_USER && interface))
+ || (u->op == INTRINSIC_USER && !interface)
+ || (u->op != INTRINSIC_USER && interface))
continue;
if (++i == *inst)
break;
@@ -746,12 +746,12 @@ number_use_names (const char *name, bool interface)
/* Try to find the operator in the current list. */
static gfc_use_rename *
-find_use_operator (gfc_intrinsic_op operator)
+find_use_operator (gfc_intrinsic_op op)
{
gfc_use_rename *u;
for (u = gfc_rename_list; u; u = u->next)
- if (u->operator == operator)
+ if (u->op == op)
return u;
return NULL;
@@ -2873,10 +2873,10 @@ mio_expr (gfc_expr **ep)
switch (e->expr_type)
{
case EXPR_OP:
- e->value.op.operator
- = MIO_NAME (gfc_intrinsic_op) (e->value.op.operator, intrinsics);
+ e->value.op.op
+ = MIO_NAME (gfc_intrinsic_op) (e->value.op.op, intrinsics);
- switch (e->value.op.operator)
+ switch (e->value.op.op)
{
case INTRINSIC_UPLUS:
case INTRINSIC_UMINUS:
@@ -3383,16 +3383,16 @@ load_operator_interfaces (void)
if (i == 1)
{
uop = gfc_get_uop (p);
- pi = mio_interface_rest (&uop->operator);
+ pi = mio_interface_rest (&uop->op);
}
else
{
if (gfc_find_uop (p, NULL))
continue;
uop = gfc_get_uop (p);
- uop->operator = gfc_get_interface ();
- uop->operator->where = gfc_current_locus;
- add_fixup (pi->integer, &uop->operator->sym);
+ uop->op = gfc_get_interface ();
+ uop->op->where = gfc_current_locus;
+ add_fixup (pi->integer, &uop->op->sym);
}
}
}
@@ -3954,7 +3954,7 @@ read_module (void)
u->found = 1;
}
- mio_interface (&gfc_current_ns->operator[i]);
+ mio_interface (&gfc_current_ns->op[i]);
}
mio_rparen ();
@@ -3984,14 +3984,14 @@ read_module (void)
if (u->found)
continue;
- if (u->operator == INTRINSIC_NONE)
+ if (u->op == INTRINSIC_NONE)
{
gfc_error ("Symbol '%s' referenced at %L not found in module '%s'",
u->use_name, &u->where, module_name);
continue;
}
- if (u->operator == INTRINSIC_USER)
+ if (u->op == INTRINSIC_USER)
{
gfc_error ("User operator '%s' referenced at %L not found "
"in module '%s'", u->use_name, &u->where, module_name);
@@ -3999,7 +3999,7 @@ read_module (void)
}
gfc_error ("Intrinsic operator '%s' referenced at %L not found "
- "in module '%s'", gfc_op2string (u->operator), &u->where,
+ "in module '%s'", gfc_op2string (u->op), &u->where,
module_name);
}
@@ -4319,11 +4319,11 @@ write_operator (gfc_user_op *uop)
static char nullstring[] = "";
const char *p = nullstring;
- if (uop->operator == NULL
+ if (uop->op == NULL
|| !gfc_check_access (uop->access, uop->ns->default_access))
return;
- mio_symbol_interface (&uop->name, &p, &uop->operator);
+ mio_symbol_interface (&uop->name, &p, &uop->op);
}
@@ -4395,7 +4395,7 @@ write_module (void)
mio_interface (gfc_check_access (gfc_current_ns->operator_access[i],
gfc_current_ns->default_access)
- ? &gfc_current_ns->operator[i] : NULL);
+ ? &gfc_current_ns->op[i] : NULL);
}
mio_rparen ();