egcs-1.1b source code bugs?

Christopher Peterson (Exchange) cpeterso@Exchange.Microsoft.com
Fri Nov 6 15:37:00 GMT 1998


Here are some suspicious warnings I found when running a Lint script over
the egcs-1.1b source tree.

have fun! :-)
chris


----------------------------------------------------------------------------
---


WARNING - bitwise-AND/OR/XOR of number compared to another value
          may have undesired result due to C precedence rules
          since bitwise-AND/OR/XOR has lower precedence than
          the comparison operators.


C:\egcs\egcs-1.1b\gcc\config\i860\i860.c (315):	& XXX == ; 8:
			       || INTVAL (arg) & 0xffff == 0)))

C:\egcs\egcs-1.1b\gcc\config\i860\i860.c (325):	& XXX == ; 8:
			   || INTVAL (XEXP (op, 1)) & 0xffff == 0)))

C:\egcs\egcs-1.1b\gcc\ginclude\math-3300.h (281):	& XXX == ; 8:
		  if (i & 1 == 0)			/* even */

C:\egcs\egcs-1.1b\libiberty\mpw.c (708):	& XXX == ; 8:
		  if (((st.st_mode & 004 == 0) && (cmd & R_OK))

C:\egcs\egcs-1.1b\libiberty\mpw.c (709):	& XXX == ; 8:
		      || ((st.st_mode & 002 == 0) && (cmd & W_OK))

C:\egcs\egcs-1.1b\libiberty\mpw.c (710):	& XXX == ; 8:
		      || ((st.st_mode & 001 == 0) && (cmd & X_OK)))

----------------------------------------------------------------------------
---


WARNING - logical AND with a number


C:\egcs\egcs-1.1b\gcc\loop.c (6594):	&& #; 6:
			&& 0)

C:\egcs\egcs-1.1b\gcc\loop.c (6759):	&& #; 6:
			&& 0)

C:\egcs\egcs-1.1b\gcc\loop.c (6803):	&& #; 6:
			    && 0)

C:\egcs\egcs-1.1b\gcc\config\i386\winnt.c (333):	&& #; 6:
	      && 0 /*???*/)

----------------------------------------------------------------------------
---


WARNING - check to see if function result was stored somewhere



C:\egcs\egcs-1.1b\gcc\cccp.c (2810):	No assignment of fn result 32:
		alloca (0);

C:\egcs\egcs-1.1b\gcc\cccp.c (2836):	No assignment of fn result 32:
	      alloca (0);

C:\egcs\egcs-1.1b\gcc\cse.c (8517):	No assignment of fn result 32:
	      alloca (0);

C:\egcs\egcs-1.1b\gcc\flow.c (1380):	No assignment of fn result 32:
		  alloca (0);

C:\egcs\egcs-1.1b\gcc\flow.c (1416):	No assignment of fn result 32:
	      alloca (0);

C:\egcs\egcs-1.1b\gcc\haifa-sched.c (7573):	No assignment of fn result
32:
	      alloca (0);

C:\egcs\egcs-1.1b\gcc\haifa-sched.c (8666):	No assignment of fn result
32:
	      alloca (0);

C:\egcs\egcs-1.1b\gcc\local-alloc.c (519):	No assignment of fn result
32:
	      alloca (0);

C:\egcs\egcs-1.1b\gcc\config\vax\vax.c (829):	No assignment of fn result
32:
	      alloca (0);

C:\egcs\egcs-1.1b\gcc\reload1.c (4236):	No assignment of fn result 32:
	      alloca (0);

C:\egcs\egcs-1.1b\gcc\sched.c (4457):	No assignment of fn result 32:
	      alloca (0);

----------------------------------------------------------------------------
---



More information about the Gcc-bugs mailing list