aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2008-06-20 06:03:16 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2008-06-20 06:03:16 +0000
commitece3f6639db4f74c38080858ff7629695635c284 (patch)
treee527f2cb222809ccd66862b763928d39fe46824c /gcc/fortran/module.c
parent2d31e498bf5baf0ad8f3cc1dcea8a1f8a042b2cb (diff)
downloadgcc-ece3f6639db4f74c38080858ff7629695635c284.zip
gcc-ece3f6639db4f74c38080858ff7629695635c284.tar.gz
gcc-ece3f6639db4f74c38080858ff7629695635c284.tar.bz2
arith.c (hollerith2representation): Fix for -Wc++-compat.
* arith.c (hollerith2representation): Fix for -Wc++-compat. * array.c (gfc_get_constructor): Likewise. * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data, create_enum_history, gfc_match_final_decl): Likewise. * error.c (error_char): Likewise. * expr.c (gfc_get_expr, gfc_copy_expr): Likewise. * gfortran.h (gfc_get_charlen, gfc_get_array_spec, gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist, gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface, gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref, gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator, gfc_get_alloc, gfc_get_wide_string): Likewise. * interface.c (count_types_test): Likewise. * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1): Likewise. * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io, gfc_match_inquire, gfc_match_wait): Likewise. * match.c (gfc_match, match_forall_iterator): Likewise. * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup, add_true_name, parse_string, write_atom, quote_string, mio_symtree_ref, mio_gmp_real, write_common_0): Likewise. * options.c (gfc_post_options): Likewise. * primary.c (match_integer_constant, match_hollerith_constant, match_boz_constant, match_real_constant, gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise. * scanner.c (gfc_widechar_to_char, add_path_to_list, add_file_change, load_line, get_file, preprocessor_line, load_file, unescape_filename, gfc_read_orig_filename): Likewise. * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft, gfc_simplify_ishftc): Likewise. * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree, gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol): Likewise. * target-memory.c (gfc_target_interpret_expr): Likewise. * trans-const.c (gfc_build_wide_string_const): Likewise. * trans-expr.c (gfc_add_interface_mapping): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_conversion, gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function, gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify, gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise. * trans.c (gfc_get_backend_locus): Likewise. * trans.h (gfc_get_ss): Likewise. From-SVN: r136982
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index f3c5316..67b09c7 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -159,7 +159,7 @@ typedef struct pointer_info
}
pointer_info;
-#define gfc_get_pointer_info() gfc_getmem(sizeof(pointer_info))
+#define gfc_get_pointer_info() XCNEW (pointer_info)
/* Lists of rename info for the USE statement. */
@@ -174,7 +174,7 @@ typedef struct gfc_use_rename
}
gfc_use_rename;
-#define gfc_get_use_rename() gfc_getmem(sizeof(gfc_use_rename))
+#define gfc_get_use_rename() XCNEW (gfc_use_rename);
/* Local variables */
@@ -460,17 +460,17 @@ add_fixup (int integer, void *gp)
if (p->integer == 0 || p->u.pointer != NULL)
{
- cp = gp;
- *cp = p->u.pointer;
+ cp = (char **) gp;
+ *cp = (char *) p->u.pointer;
}
else
{
- f = gfc_getmem (sizeof (fixup_t));
+ f = XCNEW (fixup_t);
f->next = p->fixup;
p->fixup = f;
- f->pointer = gp;
+ f->pointer = (void **) gp;
}
return p;
@@ -839,7 +839,7 @@ add_true_name (gfc_symbol *sym)
{
true_name *t;
- t = gfc_getmem (sizeof (true_name));
+ t = XCNEW (true_name);
t->sym = sym;
gfc_insert_bbt (&true_name_root, t, compare_true_names);
@@ -1028,7 +1028,7 @@ parse_string (void)
set_module_locus (&start);
- atom_string = p = gfc_getmem (len + 1);
+ atom_string = p = XCNEWVEC (char, len + 1);
for (; len > 0; len--)
{
@@ -1324,7 +1324,7 @@ write_atom (atom_type atom, const void *v)
{
case ATOM_STRING:
case ATOM_NAME:
- p = v;
+ p = (const char *) v;
break;
case ATOM_LPAREN:
@@ -1496,7 +1496,7 @@ quote_string (const gfc_char_t *s, const size_t slength)
len++;
}
- q = res = gfc_getmem (len + 1);
+ q = res = XCNEWVEC (char, len + 1);
for (p = s, i = 0; i < slength; p++, i++)
{
if (*p == '\\')
@@ -2455,7 +2455,7 @@ mio_symtree_ref (gfc_symtree **stp)
}
else
{
- f = gfc_getmem (sizeof (fixup_t));
+ f = XCNEW (fixup_t);
f->next = p->u.rsym.stfixup;
p->u.rsym.stfixup = f;
@@ -2674,7 +2674,7 @@ mio_gmp_real (mpfr_t *real)
return;
}
- atom_string = gfc_getmem (strlen (p) + 20);
+ atom_string = XCNEWVEC (char, strlen (p) + 20);
sprintf (atom_string, "0.%s@%ld", p, exponent);
@@ -4126,7 +4126,7 @@ write_common_0 (gfc_symtree *st)
mio_rparen ();
/* Record that we have written this common. */
- w = gfc_getmem (sizeof (struct written_common));
+ w = XCNEW (struct written_common);
w->name = p->name;
w->label = label;
gfc_insert_bbt (&written_commons, w, compare_written_commons);