home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / linux / 16865 < prev    next >
Encoding:
Text File  |  1992-11-16  |  1.7 KB  |  44 lines

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