home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!ukma!wupost!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!ehsn11.cen.uiuc.edu!jy10033
- From: jy10033@ehsn11.cen.uiuc.edu (Joshua M Yelon)
- Subject: Re: GCC problem
- References: <Ef1vmOa00VB3I235Vw@andrew.cmu.edu>
- Message-ID: <BxtoFD.71w@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: University of Illinois at Urbana
- Date: Mon, 16 Nov 1992 18:52:24 GMT
- Lines: 32
-
- Brian E. Gallew writes:
-
- >When I compile, I get the following error:
- >stdio.h: Line 145: error parsing before __gnuc_va_args
- >
- >I can't find where this is defined anywhere! I did find where
- >_G_VA_ARGS (or something like it) was defined as __gnuc_va_args, but
- >not the definition for the second.
-
- Let me guess... you're trying to compile emacs?
-
- The definition of __gnuc_va_args is built-in to the gnu C compiler.
- Wierd, hun? But it's ok. That's how it knows that it needs to
- do it's special tricks for variable-length argument list passing.
-
- The error is about two tokens earlier, on 'const'. s-linux.h is
- using the '-traditional' switch to GCC, and I believe that turns
- off 'const'. Of course, that blows up practically everything, so
- s-linux also does a #define const [nothing], which repairs almost
- everything. Unfortunately, the 'stdio' header is included just a
- little too soon in one place, and the 'const' doesn't get blanked
- out soon enough, and boom. I just took out the '-traditional', and
- the define of 'const', and everything worked fine. (I am using
- a 2.3 gcc.)
-
- Incidentally, you'll need to get turn off the FIX_MALLOC nonsense
- in stdlib.h, too, since it defines malloc as a macro, which is WRONG,
- and it causes an error when emacs declares
-
- void *malloc();
-
- (which is perfectly correct).
-