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]

warnings in java/jcf-parse.c


Howdy,

The Java front end stores a character into a char *, resulting in
the following warnings:

/home/kraai/src/gcc/gcc/java/jcf-parse.c: In function `yyparse':
/home/kraai/src/gcc/gcc/java/jcf-parse.c:934: warning: initialization makes pointer from integer without a cast
/home/kraai/src/gcc/gcc/java/jcf-parse.c:935: warning: comparison between pointer and integer
/home/kraai/src/gcc/gcc/java/jcf-parse.c:935: warning: comparison between pointer and integer
/home/kraai/src/gcc/gcc/java/jcf-parse.c:935: warning: comparison between pointer and integer
/home/kraai/src/gcc/gcc/java/jcf-parse.c:936: warning: comparison between pointer and integer
/home/kraai/src/gcc/gcc/java/jcf-parse.c:936: warning: comparison between pointer and integer

Changing this variable to a char eliminates the warnings and
bootstraps on i586-pc-linux-gnu.

Matt

2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>

	* jcf-parse.c (yyparse): Change ch from char * to char.

Index: gcc/java/jcf-parse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/jcf-parse.c,v
retrieving revision 1.78
diff -c -3 -p -r1.78 jcf-parse.c
*** jcf-parse.c	2001/03/16 06:12:53	1.78
--- jcf-parse.c	2001/03/18 07:21:57
*************** yyparse ()
*** 931,937 ****
      {
        for (next = list; ; )
  	{
! 	  char *ch = *next;
  	  if (ch == '\n' || ch == '\r' || ch == '\t' || ch == ' '
  	      || ch == '&' /* FIXME */)
  	    {
--- 931,937 ----
      {
        for (next = list; ; )
  	{
! 	  char ch = *next;
  	  if (ch == '\n' || ch == '\r' || ch == '\t' || ch == ' '
  	      || ch == '&' /* FIXME */)
  	    {


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