Date: Tue, 28 Jul 1998 10:33:36 +0200 (MESZ) From: Marko Schuetz <marko@king.ki.informatik.uni-frankfurt.de> To: freebsd-stable@FreeBSD.ORG Subject: Global register variables and stdio.h?!? Message-ID: <199807280833.KAA01986@king.ki.informatik.uni-frankfurt.de>
next in thread | raw e-mail | index | archive | help
[I am resending this: it seems not to have made it to the list.] I am trying to compile mercury on FreeBSD-stable (before 2.2.6-RELEASE) using gcc 2.7.2.1. Mercury tries to use global register variables, but I get the error: [...] gmake[1]: Entering directory `/usr/home/marko/src/mercury-0.7.3.orig/runtime' MERCURY_C_INCL_DIR=. ../scripts/mgnuc --grade asm_fast.gc --no-ansi -I../runtime -I../boehm_gc -g -c label.c -o label.o In file included from regs.h:67, from imp.h:36, from label.c:19: machdeps/i386_regs.h:61: global register variable follows a function definition machdeps/i386_regs.h:62: global register variable follows a function definition machdeps/i386_regs.h:67: global register variable follows a function definition gmake[1]: *** [label.o] Error 1 gmake[1]: Leaving directory `/usr/home/marko/src/mercury-0.7.3.orig/runtime' gmake: *** [runtime] Error 2 I checked the preprocessor output and found that there is only one function definition which is included from stdio.h: static __inline int __sputc(int _c, FILE *_p) { if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) return (*_p->_p++ = _c); else return (__swbuf(_c, _p)); } I know I can disable use of global register veriables, but that only seems to be a quick fix and not the correct solution. What is the correct solution: is a newer version of gcc available that perhaps allows function definitions preceding global register variable declarations or is this not a function definition in more recent FreeBSD versions? What other alternatives are there better than disabling global register variables? Marko To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807280833.KAA01986>