/* Expression parser.
- Copyright (C) 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006 Free Software Foundation,
+ Inc.
Contributed by Andy Vaught
This file is part of GCC.
}
+/* Call the INTRINSIC_PARENTHESES function. This is both
+ used explicitly, as below, or by resolve.c to generate
+ temporaries. */
+gfc_expr *
+gfc_get_parentheses (gfc_expr *e)
+{
+ gfc_expr *e2;
+
+ e2 = gfc_get_expr();
+ e2->expr_type = EXPR_OP;
+ e2->ts = e->ts;
+ e2->rank = e->rank;
+ e2->where = e->where;
+ e2->value.op.operator = INTRINSIC_PARENTHESES;
+ e2->value.op.op1 = e;
+ e2->value.op.op2 = NULL;
+ return e2;
+}
+
+
/* Match a primary expression. */
static match
if(!gfc_numeric_ts(&e->ts))
*result = e;
else
- {
- gfc_expr *e2 = gfc_get_expr();
-
- e2->expr_type = EXPR_OP;
- e2->ts = e->ts;
- e2->rank = e->rank;
- e2->where = where;
- e2->value.op.operator = INTRINSIC_PARENTHESES;
- e2->value.op.op1 = e;
- e2->value.op.op2 = NULL;
- *result = e2;
- }
+ *result = gfc_get_parentheses (e);
if (m != MATCH_YES)
{