home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / linux / 25628 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.1 KB  |  59 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!europa.eng.gtefsd.com!emory!swrinde!cs.utexas.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!sol.ctr.columbia.edu!eff!world!jrs
  3. From: jrs@world.std.com (Rick Sladkey)
  4. Subject: Re: bug in cpp?
  5. In-Reply-To: ludger.kunz@fernuni-hagen.de's message of Wed, 27 Jan 1993 10:52:25 GMT
  6. Message-ID: <JRS.93Jan27231713@lepton.world.std.com>
  7. Sender: jrs@world.std.com (Rick Sladkey)
  8. Organization: The Internet
  9. References: <1993Jan27.105225.3418@athena.mit.edu>
  10. Date: Thu, 28 Jan 1993 04:17:13 GMT
  11. Lines: 46
  12.  
  13. >>>>> On Wed, 27 Jan 1993 10:52:25 GMT,
  14. >>>>> ludger.kunz@fernuni-hagen.de (Ludger Kunz) said:
  15.  
  16. Ludger> Today i tried to compile gzip-0.8.1. Everything worked fine
  17. Ludger> except for the assembler file. The file match.S is
  18. Ludger> preprocessed by cpp with the following command:
  19. Ludger> /lib/cpp -DUNDERLINE match.S > _match.s
  20.  
  21. Ludger> When trying to compile the _match.s-file with gcc, the
  22. Ludger> following 2 messages occur:
  23. Ludger> match.s:51: invalid character '_' in opcode
  24. Ludger> match.s:63: invalid character '_' in opcode
  25.  
  26. Ludger> Looking at the file _match.s leads to the lines
  27.  
  28. Ludger> _match_init :
  29. Ludger> and 
  30. Ludger> _longest_match :
  31.  
  32. Ludger> Removing the blank between the label and the colon leads to a
  33. Ludger> successful compilation.
  34.  
  35. Not a bug in cpp.  This is a consequence of ANSI C.  If you don't want
  36. it (gas doesn't) use the -traditional option.
  37.  
  38. Ludger> Another bug concerns the following code:
  39. Ludger> add     $window+2,%edi
  40. Ludger> This leads to an error while linking. The symbol window must
  41. Ludger> be replaced with _window. There are to locations where these
  42. Ludger> replacement isn't done by cpp.  Both situations work right on
  43. Ludger> a sun.
  44.  
  45. Ludger> Is it possibly a bug in cpp for linux?
  46.  
  47. No.  GCC allows $ in an identifier unless told otherwise.  The command
  48. to prevent this is "/lib/cpp -$".  GCC does this automatically when
  49. invoking cpp on assembly files.
  50.  
  51. This is not really a weakness in GCC's cpp but in gzip's configure.
  52. Until this is improved, here are some ways to configure gzip.
  53.  
  54. $ CPP="gcc -E -traditional" ./configure prefix=/usr
  55.  
  56. or
  57.  
  58. $ CPP="/lib/cpp -$ -traditional" ./configure prefix=/usr
  59.