This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ bootstrap (part 11/n): Add casts from void *


This bit adds missing casts from void * to other types.
It also changes a typedef'd type name to be different from the
original structure.

Bootstrapped on i386-pc-linux-gnu and committed as pre-approved.


2004-07-25  Bernardo Innocenti  <bernie@develer.com>

	* basic-block.h (reorder_block_def): Rename to reorder_block_def_p.
	* c-common.c: Add missing casts from void * to other types.
	* c-decl.c: Likewise.
	* c-format.c: Likewise.
	* c-lex.c: Likewise.
	* c-pragma.c: Likewise.
	* c-typeck.c: Likewise.
	* defaults.h: Likewise.
	* genconstants.c: Likewise.
	* gengtype-lex.l: Likewise.
	* genmodes.c: Likewise.
	* read-rtl.c: Likewise.
	* rtl.c: Likewise.


diff -u -p -r1.200 basic-block.h
--- gcc/basic-block.h	30 Jun 2004 18:04:57 -0000	1.200
+++ gcc/basic-block.h	11 Jul 2004 23:56:56 -0000
@@ -300,7 +300,7 @@ typedef struct reorder_block_def
 
   /* These fields are used by bb-reorder pass.  */
   int visited;
-} *reorder_block_def;
+} *reorder_block_def_p;
 
 #define BB_FREQ_MAX 10000
 
diff -u -p -r1.525 c-common.c
--- gcc/c-common.c	30 Jun 2004 22:27:59 -0000	1.525
+++ gcc/c-common.c	11 Jul 2004 23:57:01 -0000
@@ -737,7 +737,7 @@ fname_as_string (int pretty_p)
       int len = strlen (name) + 3; /* Two for '"'s.  One for NULL.  */
       cpp_string cstr = { 0, 0 }, strname;
 
-      namep = xmalloc (len);
+      namep = XNEWVEC (char, len);
       snprintf (namep, len, "\"%s\"", name);
       strname.text = (unsigned char *) namep;
       strname.len = len - 1;
@@ -1389,7 +1389,7 @@ verify_sequence_points (tree expr)
   if (tlist_firstobj == 0)
     {
       gcc_obstack_init (&tlist_obstack);
-      tlist_firstobj = obstack_alloc (&tlist_obstack, 0);
+      tlist_firstobj = (char *) obstack_alloc (&tlist_obstack, 0);
     }
 
   verify_tree (expr, &before_sp, &after_sp, 0);
@@ -2669,7 +2673,7 @@ c_sizeof_or_alignof_type (tree type, enu
     }
   else
     {
-      if (op == SIZEOF_EXPR)
+      if (op == (enum tree_code) SIZEOF_EXPR)
 	/* Convert in case a char is more than one unit.  */
 	value = size_binop (CEIL_DIV_EXPR, TYPE_SIZE_UNIT (type),
 			    size_int (TYPE_PRECISION (char_type_node)
@@ -3559,7 +3564,7 @@ static int
 match_case_to_enum (splay_tree_node node, void *data)
 {
   tree label = (tree) node->value;
-  tree type = data;
+  tree type = (tree) data;
 
   /* Skip default case.  */
   if (!CASE_LOW (label))
@@ -4181,7 +4187,7 @@ handle_mode_attribute (tree *node, tree 
       if (len > 4 && p[0] == '_' && p[1] == '_'
 	  && p[len - 1] == '_' && p[len - 2] == '_')
 	{
-	  char *newp = alloca (len - 1);
+	  char *newp = (char *) alloca (len - 1);
 
 	  strcpy (newp, &p[2]);
 	  newp[len - 4] = '\0';
@@ -5115,8 +5121,9 @@ check_function_arguments_recurse (void (
 int
 field_decl_cmp (const void *x_p, const void *y_p)
 {
-  const tree *const x = x_p;
-  const tree *const y = y_p;
+  const tree *const x = (const tree *const) x_p;
+  const tree *const y = (const tree *const) y_p;
+
   if (DECL_NAME (*x) == DECL_NAME (*y))
     /* A nontype is "greater" than a type.  */
     return (TREE_CODE (*y) == TYPE_DECL) - (TREE_CODE (*x) == TYPE_DECL);
@@ -5140,8 +5147,8 @@ pointer operator in resort_data.  */
 static int
 resort_field_decl_cmp (const void *x_p, const void *y_p)
 {
-  const tree *const x = x_p;
-  const tree *const y = y_p;
+  const tree *const x = (const tree *const) x_p;
+  const tree *const y = (const tree *const) y_p;
 
   if (DECL_NAME (*x) == DECL_NAME (*y))
     /* A nontype is "greater" than a type.  */
diff -u -p -r1.523 c-decl.c
--- gcc/c-decl.c	1 Jul 2004 01:12:11 -0000	1.523
+++ gcc/c-decl.c	11 Jul 2004 23:57:04 -0000
@@ -2864,7 +2866,7 @@ finish_decl (tree decl, tree init, tree 
     {
       /* ASMSPEC is given, and not the name of a register.  Mark the
       name with a star so assemble_name won't munge it.  */
-      char *starred = alloca (strlen (asmspec) + 2);
+      char *starred = (char *) alloca (strlen (asmspec) + 2);
       starred[0] = '*';
       strcpy (starred + 1, asmspec);
 
diff -u -p -r1.58 c-format.c
--- gcc/c-format.c	30 Jun 2004 22:27:59 -0000	1.58
+++ gcc/c-format.c	11 Jul 2004 23:57:04 -0000
@@ -1155,8 +1155,8 @@ init_dollar_format_checking (int first_a
       if (dollar_arguments_pointer_p)
 	free (dollar_arguments_pointer_p);
       dollar_arguments_alloc = dollar_arguments_count;
-      dollar_arguments_used = xmalloc (dollar_arguments_alloc);
-      dollar_arguments_pointer_p = xmalloc (dollar_arguments_alloc);
+      dollar_arguments_used = XNEWVEC (char, dollar_arguments_alloc);
+      dollar_arguments_pointer_p = XNEWVEC (char, dollar_arguments_alloc);
     }
   if (dollar_arguments_alloc)
     {
@@ -1246,9 +1246,10 @@ maybe_read_dollar_number (const char **f
     {
       int nalloc;
       nalloc = 2 * dollar_arguments_alloc + 16;
-      dollar_arguments_used = xrealloc (dollar_arguments_used, nalloc);
-      dollar_arguments_pointer_p = xrealloc (dollar_arguments_pointer_p,
-					     nalloc);
+      dollar_arguments_used = XRESIZEVEC (char, dollar_arguments_used,
+					  nalloc);
+      dollar_arguments_pointer_p = XRESIZEVEC (char, dollar_arguments_pointer_p,
+					       nalloc);
       memset (dollar_arguments_used + dollar_arguments_alloc, 0,
 	      nalloc - dollar_arguments_alloc);
       dollar_arguments_alloc = nalloc;
@@ -1473,7 +1474,7 @@ static void
 check_format_arg (void *ctx, tree format_tree,
 		  unsigned HOST_WIDE_INT arg_num)
 {
-  format_check_context *format_ctx = ctx;
+  format_check_context *format_ctx = (format_check_context *) ctx;
   format_check_results *res = format_ctx->res;
   function_format_info *info = format_ctx->info;
   tree params = format_ctx->params;
@@ -2525,7 +2527,8 @@ init_dynamic_asm_fprintf_info (void)
 	abort ();
 
       /* Create a new (writable) copy of asm_fprintf_length_specs.  */
-      new_asm_fprintf_length_specs = xmemdup (asm_fprintf_length_specs,
+      new_asm_fprintf_length_specs = (format_length_info *)
+				     xmemdup (asm_fprintf_length_specs,
 					      sizeof (asm_fprintf_length_specs),
 					      sizeof (asm_fprintf_length_specs));
 
@@ -2551,7 +2554,7 @@ static void
 init_dynamic_diag_info (void)
 {
   static tree t, loc, hwi;
-      
+
   if (!loc || !t || !hwi)
     {
       static format_char_info *diag_fci, *cdiag_fci, *cxxdiag_fci;
@@ -2586,7 +2589,8 @@ init_dynamic_diag_info (void)
 	dynamic_format_types[gcc_diag_format_type].length_char_specs =
 	  dynamic_format_types[gcc_cdiag_format_type].length_char_specs =
 	  dynamic_format_types[gcc_cxxdiag_format_type].length_char_specs =
-	  diag_ls = xmemdup (gcc_diag_length_specs,
+	  diag_ls = (format_length_info *)
+		    xmemdup (gcc_diag_length_specs,
 			     sizeof (gcc_diag_length_specs),
 			     sizeof (gcc_diag_length_specs)); 
       if (hwi)
@@ -2604,7 +2608,8 @@ init_dynamic_diag_info (void)
       /* Handle the __gcc_diag__ format specifics.  */
       if (! diag_fci)
 	dynamic_format_types[gcc_diag_format_type].conversion_specs =
-	  diag_fci = xmemdup (gcc_diag_char_table,
+	  diag_fci = (format_char_info *)
+		     xmemdup (gcc_diag_char_table,
 			      sizeof(gcc_diag_char_table),
 			      sizeof(gcc_diag_char_table));
       if (loc)
@@ -2623,7 +2628,8 @@ init_dynamic_diag_info (void)
       /* Handle the __gcc_cdiag__ format specifics.  */
       if (! cdiag_fci)
 	dynamic_format_types[gcc_cdiag_format_type].conversion_specs =
-	  cdiag_fci = xmemdup (gcc_cdiag_char_table,
+	  cdiag_fci = (format_char_info *)
+		      xmemdup (gcc_cdiag_char_table,
 			       sizeof(gcc_cdiag_char_table),
 			       sizeof(gcc_cdiag_char_table));
       if (loc)
@@ -2646,7 +2652,8 @@ init_dynamic_diag_info (void)
       /* Handle the __gcc_cxxdiag__ format specifics.  */
       if (! cxxdiag_fci)
 	dynamic_format_types[gcc_cxxdiag_format_type].conversion_specs =
-	  cxxdiag_fci = xmemdup (gcc_cxxdiag_char_table,
+	  cxxdiag_fci = (format_char_info *)
+			xmemdup (gcc_cxxdiag_char_table,
 				 sizeof(gcc_cxxdiag_char_table),
 				 sizeof(gcc_cxxdiag_char_table));
       if (loc)
@@ -2727,7 +2734,7 @@ handle_format_attribute (tree *node, tre
       /* Our first time through, we have to make sure that our
          format_type data is allocated dynamically and is modifiable.  */
       if (!dynamic_format_types)
-	format_types = dynamic_format_types =
+	format_types = dynamic_format_types = (format_kind_info *)
 	  xmemdup (format_types_orig, sizeof (format_types_orig),
 		   sizeof (format_types_orig));
 
diff -u -p -r1.223 c-lex.c
--- gcc/c-lex.c	30 Jun 2004 18:05:03 -0000	1.223
+++ gcc/c-lex.c	11 Jul 2004 23:57:05 -0000
@@ -628,7 +628,7 @@ interpret_float (const cpp_token *token,
     /* I or J suffix.  */
     copylen--;
 
-  copy = alloca (copylen + 1);
+  copy = (char *) alloca (copylen + 1);
   memcpy (copy, token->val.str.text, copylen);
   copy[copylen] = '\0';
 
@@ -710,7 +710,7 @@ lex_string (const cpp_token *tok, tree *
 	    }
 	}
       while (tok->type == CPP_STRING || tok->type == CPP_WSTRING);
-      strs = obstack_finish (&str_ob);
+      strs = (cpp_string *) obstack_finish (&str_ob);
     }
 
   /* We have read one more token than we want.  */
diff -u -p -r1.71 c-pragma.c
--- gcc/c-pragma.c	22 Jun 2004 06:51:50 -0000	1.71
+++ gcc/c-pragma.c	11 Jul 2004 23:57:07 -0000
@@ -554,7 +554,7 @@ maybe_apply_renaming_pragma (tree decl, 
       const char *id = IDENTIFIER_POINTER (DECL_NAME (decl));
       size_t ilen = IDENTIFIER_LENGTH (DECL_NAME (decl));
 	
-      char *newname = alloca (plen + ilen + 1);
+      char *newname = (char *) alloca (plen + ilen + 1);
 
       memcpy (newname,        prefix, plen);
       memcpy (newname + plen, id, ilen + 1);
diff -u -p -r1.333 c-typeck.c
--- gcc/c-typeck.c	30 Jun 2004 18:11:13 -0000	1.333
+++ gcc/c-typeck.c	11 Jul 2004 23:57:09 -0000
@@ -3639,7 +3639,7 @@ warn_for_assignment (const char *msgid, 
 	    {
 	      /* Function name is known; supply it.  */
 	      const char *const argstring = _("passing arg of `%s'");
-	      new_opname = alloca (IDENTIFIER_LENGTH (function)
+	      new_opname = (char *) alloca (IDENTIFIER_LENGTH (function)
 				   + strlen (argstring) + 1 + 1);
 	      sprintf (new_opname, argstring,
 		       IDENTIFIER_POINTER (function));
@@ -3648,7 +3648,7 @@ warn_for_assignment (const char *msgid, 
 	    {
 	      /* Function name unknown (call through ptr).  */
 	      const char *const argnofun = _("passing arg of pointer to function");
-	      new_opname = alloca (strlen (argnofun) + 1 + 1);
+	      new_opname = (char *) alloca (strlen (argnofun) + 1 + 1);
 	      sprintf (new_opname, argnofun);
 	    }
 	}
@@ -3656,7 +3656,7 @@ warn_for_assignment (const char *msgid, 
 	{
 	  /* Function name is known; supply it.  */
 	  const char *const argstring = _("passing arg %d of `%s'");
-	  new_opname = alloca (IDENTIFIER_LENGTH (function)
+	  new_opname = (char *) alloca (IDENTIFIER_LENGTH (function)
 			       + strlen (argstring) + 1 + 25 /*%d*/ + 1);
 	  sprintf (new_opname, argstring, argnum,
 		   IDENTIFIER_POINTER (function));
@@ -3665,7 +3665,7 @@ warn_for_assignment (const char *msgid, 
 	{
 	  /* Function name unknown (call through ptr); just give arg number.  */
 	  const char *const argnofun = _("passing arg %d of pointer to function");
-	  new_opname = alloca (strlen (argnofun) + 1 + 25 /*%d*/ + 1);
+	  new_opname = (char *) alloca (strlen (argnofun) + 1 + 25 /*%d*/ + 1);
 	  sprintf (new_opname, argnofun, argnum);
 	}
       opname = new_opname;
@@ -3890,7 +3890,7 @@ error_init (const char *msgid)
   char *ofwhat;
 
   error ("%s", _(msgid));
-  ofwhat = print_spelling (alloca (spelling_length () + 1));
+  ofwhat = print_spelling ((char *) alloca (spelling_length () + 1));
   if (*ofwhat)
     error ("(near initialization for `%s')", ofwhat);
 }
@@ -3905,7 +3905,7 @@ pedwarn_init (const char *msgid)
   char *ofwhat;
 
   pedwarn ("%s", _(msgid));
-  ofwhat = print_spelling (alloca (spelling_length () + 1));
+  ofwhat = print_spelling ((char *) alloca (spelling_length () + 1));
   if (*ofwhat)
     pedwarn ("(near initialization for `%s')", ofwhat);
 }
@@ -3920,7 +3920,7 @@ warning_init (const char *msgid)
   char *ofwhat;
 
   warning ("%s", _(msgid));
-  ofwhat = print_spelling (alloca (spelling_length () + 1));
+  ofwhat = print_spelling ((char *) alloca (spelling_length () + 1));
   if (*ofwhat)
     warning ("(near initialization for `%s')", ofwhat);
 }
@@ -6203,7 +6203,7 @@ c_expand_asm_operands (tree string, tree
   int noutputs = list_length (outputs);
   int i;
   /* o[I] is the place that output number I should be written.  */
-  tree *o = alloca (noutputs * sizeof (tree));
+  tree *o = (tree *) alloca (noutputs * sizeof (tree));
   tree tail;
 
   /* Record the contents of OUTPUTS before it is modified.  */
diff -u -p -r1.140 defaults.h
--- gcc/defaults.h	3 Jun 2004 23:14:59 -0000	1.140
+++ gcc/defaults.h	11 Jul 2004 23:57:30 -0000
@@ -67,7 +67,8 @@ Software Foundation, 59 Temple Place - S
 #ifndef ASM_FORMAT_PRIVATE_NAME
 # define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
   do { const char *const name_ = (NAME); \
-       char *const output_ = (OUTPUT) = alloca (strlen (name_) + 32);\
+       char *const output_ = (OUTPUT) = \
+	 (char *) alloca (strlen (name_) + 32); \
        sprintf (output_, ASM_PN_FORMAT, name_, (unsigned long)(LABELNO)); \
   } while (0)
 #endif
diff -u -p -r1.6 genconstants.c
--- gcc/genconstants.c	1 Jun 2003 15:59:08 -0000	1.6
+++ gcc/genconstants.c	11 Jul 2004 23:58:01 -0000
@@ -42,8 +42,8 @@ static int print_md_constant (void **, v
 static int
 print_md_constant (void **slot, void *info)
 {
-  struct md_constant *def = *slot;
-  FILE *file = info;
+  struct md_constant *def = (struct md_constant *) *slot;
+  FILE *file = (FILE *) info;
 
   fprintf (file, "#define %s %s\n", def->name, def->value);
   return 1;
diff -u -p -r1.23 gengtype-lex.l
--- gcc/gengtype-lex.l	30 Jun 2004 18:21:53 -0000	1.23
+++ gcc/gengtype-lex.l	11 Jul 2004 23:58:02 -0000
@@ -85,10 +85,11 @@ ITYPE	{IWORD}({WS}{IWORD})*
       is_pointer = 1;
   for (namelen = 1; ISIDNUM (namestart[namelen]); namelen++)
     ;
-  t = find_structure (xmemdup (tagstart, taglen, taglen+1), union_p);
+  t = find_structure ((const char *) xmemdup (tagstart, taglen, taglen+1),
+		      union_p);
   if (is_pointer)
     t = create_pointer (t);
-  namestart = xmemdup (namestart, namelen, namelen+1);
+  namestart = (char *) xmemdup (namestart, namelen, namelen+1);
 #ifdef USE_MAPPED_LOCATION
   /* temporary kludge - gentype doesn't handle cpp conditionals */
   if (strcmp (namestart, "location_t") != 0)
@@ -114,13 +115,14 @@ ITYPE	{IWORD}({WS}{IWORD})*
        ISSPACE(*typestart);
        typestart++)
     ;
-  for (typelen = namestart - typestart; 
-       ISSPACE(typestart[typelen-1]); 
+  for (typelen = namestart - typestart;
+       ISSPACE (typestart[typelen-1]);
        typelen--)
     ;
 
   t = create_scalar_type (typestart, typelen);
-  do_typedef (xmemdup (namestart, namelen, namelen+1), t, &lexer_line);
+  do_typedef ((const char *) xmemdup (namestart, namelen, namelen+1), t,
+	      &lexer_line);
   update_lineno (yytext, yyleng);
 }
 
@@ -136,7 +138,8 @@ ITYPE	{IWORD}({WS}{IWORD})*
   namestart -= namelen - 1;
 
   t = create_scalar_type ("function type", sizeof ("function type")-1);
-  do_typedef (xmemdup (namestart, namelen, namelen+1), t, &lexer_line);
+  do_typedef ((const char *) xmemdup (namestart, namelen, namelen+1), t,
+	      &lexer_line);
   update_lineno (yytext, yyleng);
 }
 
@@ -152,7 +155,8 @@ ITYPE	{IWORD}({WS}{IWORD})*
   namestart -= namelen - 1;
 
   t = create_scalar_type ("function type", sizeof ("function type")-1);
-  do_typedef (xmemdup (namestart, namelen, namelen+1), t, &lexer_line);
+  do_typedef ((const char *) xmemdup (namestart, namelen, namelen+1), t,
+	      &lexer_line);
   update_lineno (yytext, yyleng);
 }
 
@@ -168,7 +172,8 @@ ITYPE	{IWORD}({WS}{IWORD})*
   namestart -= namelen - 1;
 
   t = create_scalar_type ("function type", sizeof ("function type")-1);
-  do_typedef (xmemdup (namestart, namelen, namelen+1), t, &lexer_line);
+  do_typedef ((const char *) xmemdup (namestart, namelen, namelen+1), t,
+	      &lexer_line);
   update_lineno (yytext, yyleng);
 }
 
@@ -184,7 +189,8 @@ ITYPE	{IWORD}({WS}{IWORD})*
   namestart -= namelen - 1;
 
   t = create_scalar_type ("function type", sizeof ("function type")-1);
-  do_typedef (xmemdup (namestart, namelen, namelen+1), t, &lexer_line);
+  do_typedef ((const char *) xmemdup (namestart, namelen, namelen+1), t,
+	      &lexer_line);
   update_lineno (yytext, yyleng);
 }
 
@@ -210,7 +216,9 @@ ITYPE	{IWORD}({WS}{IWORD})*
   for (taglen = 1; ISIDNUM (tagstart[taglen]); taglen++)
     ;
 
-  yylval.t = find_structure (xmemdup (tagstart, taglen, taglen + 1), union_p);
+  yylval.t = find_structure ((const char *) xmemdup (tagstart, taglen,
+						     taglen + 1),
+			     union_p);
   BEGIN(in_struct);
   update_lineno (yytext, yyleng);
   return typedef_p ? ENT_TYPEDEF_STRUCT : ENT_STRUCT;
@@ -250,7 +258,7 @@ ITYPE	{IWORD}({WS}{IWORD})*
   push_macro_expansion (macro, macro_len, arg, arg_len);
 
   /* Create the struct and typedef.  */
-  ptr = xmemdup ("VEC_", 4, 4 + arg_len + 1);
+  ptr = (char *) xmemdup ("VEC_", 4, 4 + arg_len + 1);
   memcpy (&ptr[4], arg, arg_len);
   ptr[4 + arg_len] = 0;
   t = find_structure (ptr, 0);
@@ -275,8 +283,8 @@ ITYPE	{IWORD}({WS}{IWORD})*
 "ptr_alias"/[^[:alnum:]_]	{ return ALIAS; }
 "nested_ptr"/[^[:alnum:]_]	{ return NESTED_PTR; }
 [0-9]+				{ return NUM; }
-"param"[0-9]*"_is"/[^[:alnum:]_]		{ 
-  yylval.s = xmemdup (yytext, yyleng, yyleng+1);
+"param"[0-9]*"_is"/[^[:alnum:]_]		{
+  yylval.s = (const char *) xmemdup (yytext, yyleng, yyleng+1);
   return PARAM_IS;
 }
 
@@ -307,7 +315,7 @@ ITYPE	{IWORD}({WS}{IWORD})*
   while (*ptr != ')' && !ISSPACE (*ptr))
     ptr++;
   arg_len = ptr - arg;
-  ptr = xmemdup (macro, macro_len, macro_len + arg_len + 2);
+  ptr = (char *) xmemdup (macro, macro_len, macro_len + arg_len + 2);
   ptr[macro_len] = '_';
   memcpy (&ptr[macro_len+1], arg, arg_len);
   yylval.s = ptr;
@@ -315,24 +323,24 @@ ITYPE	{IWORD}({WS}{IWORD})*
 }
 
 {ID}/[^[:alnum:]_]		{
-  yylval.s = xmemdup (yytext, yyleng, yyleng+1);
+  yylval.s = (const char *) xmemdup (yytext, yyleng, yyleng+1);
   return ID;
 }
 
 \"([^"\\]|\\.)*\"		{
-  yylval.s = xmemdup (yytext+1, yyleng-2, yyleng-1);
+  yylval.s = (const char *) xmemdup (yytext+1, yyleng-2, yyleng-1);
   return STRING;
 }
 "["[^\[\]]*"]"			{
-  yylval.s = xmemdup (yytext+1, yyleng-2, yyleng-1);
+  yylval.s = (const char *) xmemdup (yytext+1, yyleng-2, yyleng-1);
   return ARRAY;
 }
 ^"%"{ID}			{
-  yylval.s = xmemdup (yytext+1, yyleng-1, yyleng);
+  yylval.s = (const char *) xmemdup (yytext+1, yyleng-1, yyleng);
   return PERCENT_ID;
 }
 "'"("\\".|[^\\])"'"		{
-  yylval.s = xmemdup (yytext+1, yyleng-2, yyleng);
+  yylval.s = (const char *) xmemdup (yytext+1, yyleng-2, yyleng);
   return CHAR;
 }
 
diff -u -p -r1.9 genmodes.c
--- gcc/genmodes.c	6 Nov 2003 08:38:50 -0000	1.9
+++ gcc/genmodes.c	11 Jul 2004 23:58:03 -0000
@@ -703,7 +703,7 @@ calc_wider_mode (void)
 
   /* Allocate max_n_modes + 1 entries to leave room for the extra null
      pointer assigned after the qsort call below.  */
-  sortbuf = alloca ((max_n_modes + 1) * sizeof (struct mode_data *));
+  sortbuf = (struct mode_data **) alloca ((max_n_modes + 1) * sizeof (struct mode_data *));
 
   for (c = 0; c < MAX_MODE_CLASS; c++)
     {
diff -u -p -r1.23 read-rtl.c
--- gcc/read-rtl.c	10 May 2004 18:35:43 -0000	1.23
+++ gcc/read-rtl.c	11 Jul 2004 23:58:31 -0000
@@ -191,7 +191,7 @@ read_name (char *str, FILE *infile)
 	  struct md_constant tmp_def;
 
 	  tmp_def.name = p;
-	  def = htab_find (md_constants, &tmp_def);
+	  def = (struct md_constant *) htab_find (md_constants, &tmp_def);
 	  if (def)
 	    p = def->value;
 	} while (def);
@@ -277,7 +277,7 @@ read_quoted_string (struct obstack *ob, 
     }
 
   obstack_1grow (ob, 0);
-  return obstack_finish (ob);
+  return (char *) obstack_finish (ob);
 }
 
 /* Read a braced string (a la Tcl) onto the obstack.  Caller has
@@ -315,7 +315,7 @@ read_braced_string (struct obstack *ob, 
     }
 
   obstack_1grow (ob, 0);
-  return obstack_finish (ob);
+  return (char *) obstack_finish (ob);
 }
 
 /* Read some kind of string constant.  This is the high-level routine
@@ -455,7 +455,7 @@ read_constants (FILE *infile, char *tmp_
 	}
       else
 	{
-	  def = *entry_ptr;
+	  def = (struct md_constant *) *entry_ptr;
 	  if (strcmp (def->value, tmp_char))
 	    fatal_with_file_and_line (infile,
 				      "redefinition of %s, was %s, now %s",
diff -u -p -r1.137 rtl.c
--- gcc/rtl.c	9 Apr 2004 19:57:42 -0000	1.137
+++ gcc/rtl.c	11 Jul 2004 23:58:43 -0000
@@ -179,7 +179,8 @@ rtx_alloc_stat (RTX_CODE code MEM_STAT_D
 {
   rtx rt;
 
-  rt = ggc_alloc_typed_stat (gt_ggc_e_7rtx_def, RTX_SIZE (code) PASS_MEM_STAT);
+  rt = (rtx) ggc_alloc_typed_stat (gt_ggc_e_7rtx_def,
+				   RTX_SIZE (code) PASS_MEM_STAT);
 
   /* We want to clear everything up to the FLD array.  Normally, this
      is one int, but we don't want to assume that and it isn't very
@@ -315,8 +316,8 @@ shallow_copy_rtx_stat (rtx orig MEM_STAT
 {
   rtx copy;
 
-  copy = ggc_alloc_typed_stat (gt_ggc_e_7rtx_def, RTX_SIZE (GET_CODE (orig))
-			       PASS_MEM_STAT);
+  copy = (rtx) ggc_alloc_typed_stat (gt_ggc_e_7rtx_def,
+				     RTX_SIZE (GET_CODE (orig)) PASS_MEM_STAT);
   memcpy (copy, orig, RTX_SIZE (GET_CODE (orig)));
   return copy;
 }


-- 
  // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]