[comp.lang.c++] help needed to complie NIHCL using C++ 2.1

zq@eecg.toronto.edu (Qing Zheng) (03/23/91)

 Now I'm trying to compile NIHCL 3.0 using AT&T C++ 2.1 on Sun SPARC
 (SunOS 4.1). I get the following error message

 in StackProc.c 

   "/usr/src/local/CC2.1/include/CC/malloc.h", line 91: error: two
	 different return
		value types for __builtin_alloca():  void * and  char *

  The problem is in alloca.h ( in /usr/src/local/CC2.1/include/CC ),
  alloca() is defined as

  #if defined(sparc)
  # define alloca(x) __builtin_alloca(x)
  #endif

  #endif /*!_alloca_h*/


  extern "C" {
		  void *__builtin_alloca(int);
		  }

  But in malloc.h (also in /usr/src/local/CC2.1/include/CC ), it is
  declared as

	char *alloca(int);

  I can change "void" into "char" in alloca.h, however, I'm not sure
  whether this will cause some other problems. What is the best way
  to solve this problem ?

  Please send e-mail to zq@eecg.toronto.edu or zq@eecg.utoronto.ca

  Thanks in advance.


  ----Qing