Path: utzoo!utgpu!news-server.csri.toronto.edu!eecg.toronto.edu!zq Newsgroups: comp.lang.c++ From: zq@eecg.toronto.edu (Qing Zheng) Subject: help needed to complie NIHCL using C++ 2.1 Message-ID: <1991Mar22.150626.14284@jarvis.csri.toronto.edu> Distribution: comp Date: 22 Mar 91 20:06:26 GMT Lines: 39 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