🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Paul Eggert Thu, 03 Sep 1992 03:53
GCC 2.2.2's source code sometimes uses `-1' in an unsigned context
#1051
Author: Paul Eggert
Date: Thu, 03 Sep 1992 03:53
70 lines
2870 bytes
GCC 2.2.2's source code sometimes uses a constant expression equivalent to
`-1' in an unsigned context.  This is a little confusing, and it provokes
warning messages in some compilers.  Here is a patch.

Thu Sep  3 03:28:35 1992  Paul Eggert  (eggert@twinsun.com)

	* integrate.h (CONST_AGE_PARM): Make it unsigned, to avoid
	warnings about negative numbers in unsigned contexts.
	* unroll.c (copy_loop_body): Use `CONST_AGE_PARM', not `-1'.
	* combine.c (simplify_and_const_int): Cast ~0 to unsigned,
	for similar reasons.

===================================================================
RCS file: RCS/integrate.h,v
retrieving revision 2.2
diff -c2 -r2.2 integrate.h
*** integrate.h	1992/01/14 11:50:17	2.2
--- integrate.h	1992/09/03 03:28:35
***************
*** 71,75 ****
       A value of -1 indicates an entry for a reg which is a parm.
       All other values are "positive".  */
! #define CONST_AGE_PARM (-1)
    unsigned int const_age;
    /* In parallel with const_equiv_map, record the valid age for each entry.
--- 71,75 ----
       A value of -1 indicates an entry for a reg which is a parm.
       All other values are "positive".  */
! #define CONST_AGE_PARM ((unsigned) -1)
    unsigned int const_age;
    /* In parallel with const_equiv_map, record the valid age for each entry.
===================================================================
RCS file: RCS/unroll.c,v
retrieving revision 2.2
diff -c2 -r2.2 unroll.c
*** unroll.c	1992/05/27 22:10:02	2.2
--- unroll.c	1992/09/03 03:29:28
***************
*** 1662,1666 ****
  
  	      if (map->const_age_map[regno] == map->const_age)
! 		map->const_age_map[regno] = -1;
  	    }
  	  break;
--- 1662,1666 ----
  
  	      if (map->const_age_map[regno] == map->const_age)
! 		map->const_age_map[regno] = CONST_AGE_PARM;
  	    }
  	  break;

===================================================================
RCS file: RCS/combine.c,v
retrieving revision 2.2
diff -c2 -r2.2 combine.c
*** combine.c	1992/06/02 21:35:27	2.2
--- combine.c	1992/09/03 03:30:26
***************
*** 4988,4992 ****
  	      varop = plus_constant (XEXP (varop, 0),
  				     INTVAL (XEXP (varop, 1)) & constop);
! 	      constop = ~0;
  	      break;
  	    }
--- 4988,4992 ----
  	      varop = plus_constant (XEXP (varop, 0),
  				     INTVAL (XEXP (varop, 1)) & constop);
! 	      constop = (unsigned) ~0;
  	      break;
  	    }
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads