diff options
-rw-r--r-- | gcc/fortran/decl.c | 15 | ||||
-rw-r--r-- | gcc/fortran/match.c | 26 | ||||
-rw-r--r-- | gcc/fortran/match.h | 9 |
3 files changed, 8 insertions, 42 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index ce61e53..2788348 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -3128,7 +3128,7 @@ cleanup: This assumes that the byte size is equal to the kind number for non-COMPLEX types, and equal to twice the kind number for COMPLEX. */ -match +static match gfc_match_old_kind_spec (gfc_typespec *ts) { match m; @@ -5851,7 +5851,7 @@ set_binding_label (const char **dest_label, const char *sym_name, /* Set the status of the given common block as being BIND(C) or not, depending on the given parameter, is_bind_c. */ -void +static void set_com_block_bind_c (gfc_common_head *com_block, int is_bind_c) { com_block->is_bind_c = is_bind_c; @@ -6039,7 +6039,7 @@ verify_bind_c_sym (gfc_symbol *tmp_sym, gfc_typespec *ts, the type is C interoperable. Errors are reported by the functions used to set/test these fields. */ -bool +static bool set_verify_bind_c_sym (gfc_symbol *tmp_sym, int num_idents) { bool retval = true; @@ -6059,7 +6059,7 @@ set_verify_bind_c_sym (gfc_symbol *tmp_sym, int num_idents) /* Set the fields marking the given common block as BIND(C), including a binding label, and report any errors encountered. */ -bool +static bool set_verify_bind_c_com_block (gfc_common_head *com_block, int num_idents) { bool retval = true; @@ -6079,7 +6079,7 @@ set_verify_bind_c_com_block (gfc_common_head *com_block, int num_idents) /* Retrieve the list of one or more identifiers that the given bind(c) attribute applies to. */ -bool +static bool get_bind_c_idents (void) { char name[GFC_MAX_SYMBOL_LEN + 1]; @@ -6788,7 +6788,7 @@ match_result (gfc_symbol *function, gfc_symbol **result) clause and BIND(C), either one, or neither. The draft does not require them to come in a specific order. */ -match +static match gfc_match_suffix (gfc_symbol *sym, gfc_symbol **result) { match is_bind_c; /* Found bind(c). */ @@ -10100,7 +10100,7 @@ check_extended_derived_type (char *name) not a handled attribute, and MATCH_YES otherwise. TODO: More error checking on attribute conflicts needs to be done. */ -match +static match gfc_get_type_attr_spec (symbol_attribute *attr, char *name) { /* See if the derived type is marked as private. */ @@ -11778,6 +11778,7 @@ gfc_match_gcc_unroll (void) { int value; + /* FIXME: use gfc_match_small_literal_int instead, delete small_int */ if (gfc_match_small_int (&value) == MATCH_YES) { if (value < 0 || value > USHRT_MAX) diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 91cde55..5d07f89 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -530,32 +530,6 @@ gfc_match_small_int (int *value) } -/* This function is the same as the gfc_match_small_int, except that - we're keeping the pointer to the expr. This function could just be - removed and the previously mentioned one modified, though all calls - to it would have to be modified then (and there were a number of - them). Return MATCH_ERROR if fail to extract the int; otherwise, - return the result of gfc_match_expr(). The expr (if any) that was - matched is returned in the parameter expr. */ - -match -gfc_match_small_int_expr (int *value, gfc_expr **expr) -{ - match m; - int i; - - m = gfc_match_expr (expr); - if (m != MATCH_YES) - return m; - - if (gfc_extract_int (*expr, &i, 1)) - m = MATCH_ERROR; - - *value = i; - return m; -} - - /* Matches a statement label. Uses gfc_match_small_literal_int() to do most of the work. */ diff --git a/gcc/fortran/match.h b/gcc/fortran/match.h index eb9459e..e9368db 100644 --- a/gcc/fortran/match.h +++ b/gcc/fortran/match.h @@ -48,9 +48,7 @@ match gfc_match_eos (void); match gfc_match_small_literal_int (int *, int *); match gfc_match_st_label (gfc_st_label **); match gfc_match_small_int (int *); -match gfc_match_small_int_expr (int *, gfc_expr **); match gfc_match_name (char *); -match gfc_match_name_C (const char **buffer); match gfc_match_symbol (gfc_symbol **, int); match gfc_match_sym_tree (gfc_symtree **, int); match gfc_match_intrinsic_op (gfc_intrinsic_op *); @@ -236,7 +234,6 @@ match gfc_match_omp_end_single (void); match gfc_match_data (void); match gfc_match_null (gfc_expr **); match gfc_match_kind_spec (gfc_typespec *, bool); -match gfc_match_old_kind_spec (gfc_typespec *); match gfc_match_decl_type_spec (gfc_typespec *, int); match gfc_match_end (gfc_statement *); @@ -295,14 +292,8 @@ match gfc_match_volatile (void); /* Fortran 2003 c interop. TODO: some of these should be moved to another file rather than decl.c */ -void set_com_block_bind_c (gfc_common_head *, int); -bool set_verify_bind_c_sym (gfc_symbol *, int); -bool set_verify_bind_c_com_block (gfc_common_head *, int); -bool get_bind_c_idents (void); match gfc_match_bind_c_stmt (void); -match gfc_match_suffix (gfc_symbol *, gfc_symbol **); match gfc_match_bind_c (gfc_symbol *, bool); -match gfc_get_type_attr_spec (symbol_attribute *, char*); /* primary.c. */ match gfc_match_structure_constructor (gfc_symbol *, gfc_expr **); |