aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <aldot@gcc.gnu.org>2021-10-24 21:04:44 +0200
committerBernhard Reutner-Fischer <aldot@gcc.gnu.org>2021-10-27 21:17:44 +0200
commitfd39c4bf5568bf3b71a2c547304795bd947b8efd (patch)
treef6078624b8c5e203bc9499d0f057b8e71f284b39 /gcc/fortran/trans-expr.c
parent1f98c4e0c54b29fec4aba0b250ff7b5da57c1096 (diff)
downloadgcc-fd39c4bf5568bf3b71a2c547304795bd947b8efd.zip
gcc-fd39c4bf5568bf3b71a2c547304795bd947b8efd.tar.gz
gcc-fd39c4bf5568bf3b71a2c547304795bd947b8efd.tar.bz2
Fortran: make some trans* functions static
This makes some trans* functions static and deletes declarations of functions that either do not exist anymore like gfc_get_function_decl or that are unused like gfc_check_any_c_kind. gcc/fortran/ChangeLog: * expr.c (is_non_empty_structure_constructor): Make static. * gfortran.h (gfc_check_any_c_kind): Delete. * match.c (gfc_match_label): Make static. * match.h (gfc_match_label): Delete declaration. * scanner.c (file_changes_cur, file_changes_count, file_changes_allocated): Make static. * trans-expr.c (gfc_get_character_len): Make static. (gfc_class_len_or_zero_get): Make static. (VTAB_GET_FIELD_GEN): Undefine. (gfc_get_class_array_ref): Make static. (gfc_finish_interface_mapping): Make static. * trans-types.c (gfc_check_any_c_kind): Delete. (pfunc_type_node, dtype_type_node, gfc_get_ppc_type): Make static. * trans-types.h (gfc_get_ppc_type): Delete declaration. * trans.c (gfc_msg_wrong_return): Delete. * trans.h (gfc_class_len_or_zero_get, gfc_class_vtab_extends_get, gfc_vptr_extends_get, gfc_get_class_array_ref, gfc_get_character_len, gfc_finish_interface_mapping, gfc_msg_wrong_return, gfc_get_function_decl): Delete declaration.
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 2d7f9e0..e7aec38 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -45,7 +45,7 @@ along with GCC; see the file COPYING3. If not see
/* Calculate the number of characters in a string. */
-tree
+static tree
gfc_get_character_len (tree type)
{
tree len;
@@ -278,7 +278,7 @@ gfc_class_len_get (tree decl)
/* Try to get the _len component of a class. When the class is not unlimited
poly, i.e. no _len field exists, then return a zero node. */
-tree
+static tree
gfc_class_len_or_zero_get (tree decl)
{
tree len;
@@ -382,7 +382,7 @@ VTAB_GET_FIELD_GEN (def_init, VTABLE_DEF_INIT_FIELD)
VTAB_GET_FIELD_GEN (copy, VTABLE_COPY_FIELD)
VTAB_GET_FIELD_GEN (final, VTABLE_FINAL_FIELD)
VTAB_GET_FIELD_GEN (deallocate, VTABLE_DEALLOCATE_FIELD)
-
+#undef VTAB_GET_FIELD_GEN
/* The size field is returned as an array index type. Therefore treat
it and only it specially. */
@@ -1367,7 +1367,7 @@ gfc_conv_class_to_class (gfc_se *parmse, gfc_expr *e, gfc_typespec class_ts,
/* Given a class array declaration and an index, returns the address
of the referenced element. */
-tree
+static tree
gfc_get_class_array_ref (tree index, tree class_decl, tree data_comp,
bool unlimited)
{
@@ -4531,7 +4531,7 @@ gfc_add_interface_mapping (gfc_interface_mapping * mapping,
the length of each argument, adding any initialization code to PRE and
any finalization code to POST. */
-void
+static void
gfc_finish_interface_mapping (gfc_interface_mapping * mapping,
stmtblock_t * pre, stmtblock_t * post)
{