@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see
#define gfc_get_data() XCNEW (gfc_data)
-static gfc_try set_binding_label (char **, const char *, int);
+static gfc_try set_binding_label (const char **, const char *, int);
/* This flag is set if an old-style length selector is matched
@@ -55,7 +55,7 @@ static gfc_array_spec *current_as;
static int colon_seen;
/* The current binding label (if any). */
-static char* curr_binding_label;
+static const char* curr_binding_label;
/* Need to know how many identifiers are on the current data declaration
line in case we're given the BIND(C) attribute with a NAME= specifier. */
static int num_idents_on_line;
@@ -3808,7 +3808,8 @@ cleanup:
there is more than one argument (num_idents), it is an error. */
static gfc_try
-set_binding_label (char **dest_label, const char *sym_name, int num_idents)
+set_binding_label (const char **dest_label, const char *sym_name,
+ int num_idents)
{
if (num_idents > 1 && has_name_equals)
{
@@ -5713,7 +5714,7 @@ match
gfc_match_bind_c (gfc_symbol *sym, bool allow_binding_name)
{
/* binding label, if exists */
- char* binding_label = NULL;
+ const char* binding_label = NULL;
match double_quote;
match single_quote;
@@ -1237,7 +1237,7 @@ typedef struct gfc_symbol
/* This may be repetitive, since the typespec now has a binding
label field. */
- char* binding_label;
+ const char* binding_label;
/* Store a reference to the common_block, if this symbol is in one. */
struct gfc_common_head *common_block;
@@ -1254,7 +1254,7 @@ typedef struct gfc_common_head
char use_assoc, saved, threadprivate;
char name[GFC_MAX_SYMBOL_LEN + 1];
struct gfc_symbol *head;
- char* binding_label;
+ const char* binding_label;
int is_bind_c;
}
gfc_common_head;
@@ -2595,7 +2595,7 @@ gfc_try verify_bind_c_sym (gfc_symbol *, gfc_typespec *, int, gfc_common_head *)
gfc_try verify_bind_c_derived_type (gfc_symbol *);
gfc_try verify_com_block_vars_c_interop (gfc_common_head *);
void generate_isocbinding_symbol (const char *, iso_c_binding_symbol, const char *);
-gfc_symbol *get_iso_c_sym (gfc_symbol *, char *, char *, int);
+gfc_symbol *get_iso_c_sym (gfc_symbol *, char *, const char *, int);
int gfc_get_sym_tree (const char *, gfc_namespace *, gfc_symtree **, bool);
int gfc_get_ha_symbol (const char *, gfc_symbol **);
int gfc_get_ha_sym_tree (const char *, gfc_symtree **);
@@ -581,7 +581,7 @@ gfc_match_name (char *buffer)
we successfully match a C name. */
match
-gfc_match_name_C (char **buffer)
+gfc_match_name_C (const char **buffer)
{
locus old_loc;
size_t i = 0;
@@ -52,7 +52,7 @@ match gfc_match_label (void);
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 (char **buffer);
+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 *);
@@ -3356,7 +3356,7 @@ generic:
static void
set_name_and_label (gfc_code *c, gfc_symbol *sym,
- char *name, char **binding_label)
+ char *name, const char **binding_label)
{
gfc_expr *arg = NULL;
char type;
@@ -3420,7 +3420,7 @@ gfc_iso_c_sub_interface (gfc_code *c, gfc_symbol *sym)
gfc_symbol *new_sym;
/* this is fine, since we know the names won't use the max */
char name[GFC_MAX_SYMBOL_LEN + 1];
- char* binding_label;
+ const char* binding_label;
/* default to success; will override if find error */
match m = MATCH_YES;
@@ -4683,7 +4683,7 @@ generate_isocbinding_symbol (const char *mod_name, iso_c_binding_symbol s,
gfc_symbol *
get_iso_c_sym (gfc_symbol *old_sym, char *new_name,
- char *new_binding_label, int add_optional_arg)
+ const char *new_binding_label, int add_optional_arg)
{
gfc_symtree *new_symtree = NULL;