Pointer Problem

liang at CS.UOREGON.EDU liang at CS.UOREGON.EDU
Sat Mar 10 18:21:12 AEST 1990


						Mar, 9, 1990

   I attempted to port a compiler written in C from Unix into PC for my

 friend. When I compiled parser.c with Microsoft C 4.0, I got following 

 error message


	"parser.c(167):warning 47: '=' : different levels of indirection"


   Following is the code: 

   /* code in line 167 is final_ast = program(root); */

   struct ast {			/* abstract syntax tree */
		int info;
		int tval;
		int ln;
		struct ast *left;
		struct ast *right;
	      };


   struct ast *root, *final_ast;

		:
		:

    final_ast = program(root);  /* This is the line 167, error happen here */

		:
		:
		:

    struct ast *program(root) 	/* The declaration of function program */
    struct ast *root;
    {
          	:
		:
		:
    }
	


	If anyone knows the reason or how to fix it, please drop me a note

   by email.


			Thanks in advance.



						Steve J. Zhang


    email: liang at cs.uoregon.edu



More information about the Comp.lang.c mailing list