aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2012-01-29 21:01:09 +0200
committerJanne Blomqvist <jb@gcc.gnu.org>2012-01-29 21:01:09 +0200
commit9975a30b5c5cab71620d94ddaec21517da9db12a (patch)
tree23b6045fb8229578f5f13d9f3ea7b8ffd9821851 /gcc/fortran/decl.c
parent9e85a9fd0dddf4df2991931cbc3dde1841a1b0fb (diff)
downloadgcc-9975a30b5c5cab71620d94ddaec21517da9db12a.zip
gcc-9975a30b5c5cab71620d94ddaec21517da9db12a.tar.gz
gcc-9975a30b5c5cab71620d94ddaec21517da9db12a.tar.bz2
PR 51808 Constify binding_label.
2012-01-29 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/51808 * decl.c (set_binding_label): Make binding_label argument const. (curr_binding_label): Constify. * gfortran.h (gfc_symbol): Constify binding_label. (gfc_common_head): Likewise. (get_iso_c_sym): Likewise. * match.c (gfc_match_name_C): Constify buffer argument. * match.h (gfc_match_name_C): Likewise. * resolve.c (set_name_and_label): Constify binding_label argument. (gfc_iso_c_sub_interface): Constify binding_label variable. * symbol.c (get_iso_c_sym): Constify binding_label argument. From-SVN: r183679
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 0cfb0ef..c87fc1b 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -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;