public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* patch to clean up warning on alpha-dec-osf4.0
@ 1997-09-08  8:54 Weiwen Liu
  1997-09-08  9:10 ` Jeffrey A Law
  1997-09-08 16:04 ` Richard Henderson
  0 siblings, 2 replies; 4+ messages in thread
From: Weiwen Liu @ 1997-09-08  8:54 UTC (permalink / raw)
  To: egcs

Hi,

The following patch cleans up warnings on alpha-osf-dec4.0.



Sun Sep  7 23:57:50 1997  Weiwen Liu  <liu@hepunix.physics.yale.edu>

	* alias.c (init_alias_analysis): Clean up incompatible pointer
	type warning in bzero.
	* regmove.c (regmove_optimize): Ditto.
	* haifa-sched.c (find_rgns): Ditto.

	* haifa-sched.c (print_value): Clean up ptr->int cast
	warnings.

*** gcc/alias.c.~1~	Wed Sep  3 15:28:49 1997
--- gcc/alias.c	Sun Sep  7 23:57:41 1997
*************** init_alias_analysis ()
*** 925,931 ****
        reg_base_value_size = maxreg * 2;
        reg_base_value = (rtx *)oballoc (reg_base_value_size * sizeof (rtx));
        reg_seen = (char *)alloca (reg_base_value_size);
!       bzero (reg_base_value, reg_base_value_size * sizeof (rtx));
        bzero (reg_seen, reg_base_value_size);
  
        /* Mark all hard registers which may contain an address.
--- 925,931 ----
        reg_base_value_size = maxreg * 2;
        reg_base_value = (rtx *)oballoc (reg_base_value_size * sizeof (rtx));
        reg_seen = (char *)alloca (reg_base_value_size);
!       bzero ((char *) reg_base_value, reg_base_value_size * sizeof (rtx));
        bzero (reg_seen, reg_base_value_size);
  
        /* Mark all hard registers which may contain an address.
*** gcc/regmove.c.~1~	Tue Aug 12 00:07:12 1997
--- gcc/regmove.c	Sun Sep  7 23:55:52 1997
*************** regmove_optimize (f, nregs, regmove_dump
*** 152,158 ****
  	      /* Must initialize this before the loop, because the code for
  		 the commutative case may set matches for operands other than
  		 the current one.  */
! 	      bzero (matches, sizeof (matches));
      
  	      for (operand_number = 0;
  		   operand_number < insn_n_operands[insn_code_number];
--- 152,158 ----
  	      /* Must initialize this before the loop, because the code for
  		 the commutative case may set matches for operands other than
  		 the current one.  */
! 	      bzero ((char *)matches, sizeof (matches));
      
  	      for (operand_number = 0;
  		   operand_number < insn_n_operands[insn_code_number];
*************** regmove_optimize (f, nregs, regmove_dump
*** 714,720 ****
  	  /* Must initialize this before the loop, because the code for
  	     the commutative case may set matches for operands other than
  	     the current one.  */
! 	  bzero (matches, sizeof (matches));
  
  	  for (operand_number = 0;
  	       operand_number < insn_n_operands[insn_code_number];
--- 714,720 ----
  	  /* Must initialize this before the loop, because the code for
  	     the commutative case may set matches for operands other than
  	     the current one.  */
! 	  bzero ((char *) matches, sizeof (matches));
  
  	  for (operand_number = 0;
  	       operand_number < insn_n_operands[insn_code_number];
*** gcc/haifa-sched.c.~1~	Fri Sep  5 15:36:35 1997
--- gcc/haifa-sched.c	Sun Sep  7 23:55:02 1997
*************** find_rgns ()
*** 1628,1634 ****
    /* function's inner arrays allocation and initialization */
    max_hdr = (int *) alloca (n_basic_blocks * sizeof (int));
    dfs_nr = (int *) alloca (n_basic_blocks * sizeof (int));
!   bzero ((int *) dfs_nr, n_basic_blocks * sizeof (int));
    stack = (int *) alloca (nr_edges * sizeof (int));
    queue = (int *) alloca (n_basic_blocks * sizeof (int));
  
--- 1628,1634 ----
    /* function's inner arrays allocation and initialization */
    max_hdr = (int *) alloca (n_basic_blocks * sizeof (int));
    dfs_nr = (int *) alloca (n_basic_blocks * sizeof (int));
!   bzero ((char *) dfs_nr, n_basic_blocks * sizeof (int));
    stack = (int *) alloca (nr_edges * sizeof (int));
    queue = (int *) alloca (n_basic_blocks * sizeof (int));
  
*************** print_value (buf, x, verbose)
*** 6089,6099 ****
  	strcpy (t, "fr");
        else
  	strcpy (t, "r");
!       sprintf (buf, "%s%d", t, (int) XEXP (x, 0));
        break;
      case SUBREG:
        print_value (t, XEXP (x, 0), verbose);
!       sprintf (buf, "%s#%d", t, (int) XEXP (x, 1));
        break;
      case SCRATCH:
        sprintf (buf, "scratch");
--- 6089,6099 ----
  	strcpy (t, "fr");
        else
  	strcpy (t, "r");
!       sprintf (buf, "%s%d", t, !! XEXP (x, 0));
        break;
      case SUBREG:
        print_value (t, XEXP (x, 0), verbose);
!       sprintf (buf, "%s#%d", t, !! XEXP (x, 1));
        break;
      case SCRATCH:
        sprintf (buf, "scratch");


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: patch to clean up warning on alpha-dec-osf4.0
  1997-09-08  8:54 patch to clean up warning on alpha-dec-osf4.0 Weiwen Liu
@ 1997-09-08  9:10 ` Jeffrey A Law
  1997-09-08 16:04 ` Richard Henderson
  1 sibling, 0 replies; 4+ messages in thread
From: Jeffrey A Law @ 1997-09-08  9:10 UTC (permalink / raw)
  To: Weiwen Liu; +Cc: egcs

  In message < Pine.OSF.3.96.970908015715.19489A-100000@hepunix1.physics.yale.edu > you write:> Hi,
  > Sun Sep  7 23:57:50 1997  Weiwen Liu  <liu@hepunix.physics.yale.edu>
  > 
  > 	* alias.c (init_alias_analysis): Clean up incompatible pointer
  > 	type warning in bzero.
  > 	* regmove.c (regmove_optimize): Ditto.
  > 	* haifa-sched.c (find_rgns): Ditto.
  > 
  > 	* haifa-sched.c (print_value): Clean up ptr->int cast
  > 	warnings.
Thanks.  I've installed this patch.

jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: patch to clean up warning on alpha-dec-osf4.0
  1997-09-08  8:54 patch to clean up warning on alpha-dec-osf4.0 Weiwen Liu
  1997-09-08  9:10 ` Jeffrey A Law
@ 1997-09-08 16:04 ` Richard Henderson
  1997-09-09  8:13   ` Jeffrey A Law
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Henderson @ 1997-09-08 16:04 UTC (permalink / raw)
  To: Weiwen Liu; +Cc: egcs

> !       sprintf (buf, "%s%d", t, (int) XEXP (x, 0));
> --- 6089,6099 ----
> !       sprintf (buf, "%s%d", t, !! XEXP (x, 0));

That's not correct.  What is wanted is REGNO(x), and,
just below, SUBREG_WORD(x).


r~

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: patch to clean up warning on alpha-dec-osf4.0
  1997-09-08 16:04 ` Richard Henderson
@ 1997-09-09  8:13   ` Jeffrey A Law
  0 siblings, 0 replies; 4+ messages in thread
From: Jeffrey A Law @ 1997-09-09  8:13 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Weiwen Liu, egcs

  In message < 199709082302.QAA05088@dot.cygnus.com >you write:
  > > !       sprintf (buf, "%s%d", t, (int) XEXP (x, 0));
  > > --- 6089,6099 ----
  > > !       sprintf (buf, "%s%d", t, !! XEXP (x, 0));
  > 
  > That's not correct.  What is wanted is REGNO(x), and,
  > just below, SUBREG_WORD(x).
You're absolutely correct.  I've fixed this.
jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-09-09  8:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-08  8:54 patch to clean up warning on alpha-dec-osf4.0 Weiwen Liu
1997-09-08  9:10 ` Jeffrey A Law
1997-09-08 16:04 ` Richard Henderson
1997-09-09  8:13   ` Jeffrey A Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).