aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-format.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-format.c')
-rw-r--r--gcc/c-format.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-format.c b/gcc/c-format.c
index 8a8fa2f..7a797ba 100644
--- a/gcc/c-format.c
+++ b/gcc/c-format.c
@@ -2077,7 +2077,7 @@ check_format_info_main (format_check_results *res,
fci = fci->chain;
if (fci)
{
- wanted_type_ptr = ggc_alloc (sizeof (main_wanted_type));
+ wanted_type_ptr = GGC_NEW (format_wanted_type);
arg_num++;
wanted_type = *fci->types[length_chars_val].type;
wanted_type_name = fci->types[length_chars_val].name;
@@ -2286,7 +2286,7 @@ format_type_warning (const char *descr, const char *format_start,
this is adequate, but formats taking pointers to functions or
arrays would require the full type to be built up in order to
print it with %T. */
- p = alloca (pointer_count + 2);
+ p = (char *) alloca (pointer_count + 2);
if (pointer_count == 0)
p[0] = 0;
else if (c_dialect_cxx ())