home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- 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
- From: jrs@world.std.com (Rick Sladkey)
- Subject: Re: bug in cpp?
- In-Reply-To: ludger.kunz@fernuni-hagen.de's message of Wed, 27 Jan 1993 10:52:25 GMT
- Message-ID: <JRS.93Jan27231713@lepton.world.std.com>
- Sender: jrs@world.std.com (Rick Sladkey)
- Organization: The Internet
- References: <1993Jan27.105225.3418@athena.mit.edu>
- Date: Thu, 28 Jan 1993 04:17:13 GMT
- Lines: 46
-
- >>>>> On Wed, 27 Jan 1993 10:52:25 GMT,
- >>>>> ludger.kunz@fernuni-hagen.de (Ludger Kunz) said:
-
- Ludger> Today i tried to compile gzip-0.8.1. Everything worked fine
- Ludger> except for the assembler file. The file match.S is
- Ludger> preprocessed by cpp with the following command:
- Ludger> /lib/cpp -DUNDERLINE match.S > _match.s
-
- Ludger> When trying to compile the _match.s-file with gcc, the
- Ludger> following 2 messages occur:
- Ludger> match.s:51: invalid character '_' in opcode
- Ludger> match.s:63: invalid character '_' in opcode
-
- Ludger> Looking at the file _match.s leads to the lines
-
- Ludger> _match_init :
- Ludger> and
- Ludger> _longest_match :
-
- Ludger> Removing the blank between the label and the colon leads to a
- Ludger> successful compilation.
-
- Not a bug in cpp. This is a consequence of ANSI C. If you don't want
- it (gas doesn't) use the -traditional option.
-
- Ludger> Another bug concerns the following code:
- Ludger> add $window+2,%edi
- Ludger> This leads to an error while linking. The symbol window must
- Ludger> be replaced with _window. There are to locations where these
- Ludger> replacement isn't done by cpp. Both situations work right on
- Ludger> a sun.
-
- Ludger> Is it possibly a bug in cpp for linux?
-
- No. GCC allows $ in an identifier unless told otherwise. The command
- to prevent this is "/lib/cpp -$". GCC does this automatically when
- invoking cpp on assembly files.
-
- This is not really a weakness in GCC's cpp but in gzip's configure.
- Until this is improved, here are some ways to configure gzip.
-
- $ CPP="gcc -E -traditional" ./configure prefix=/usr
-
- or
-
- $ CPP="/lib/cpp -$ -traditional" ./configure prefix=/usr
-