cpp using cpplib fails to preprocess asm code

Zack Weinberg zack@bitmover.com
Sat Oct 30 23:18:00 GMT 1999


Philipp Thomas wrote:
> I don't know if this is a known bug, but it seems, that a cpp that uses
> cpplib doesn't relax syntax checking when processing .S files. A few
> .S files (to be assembled by the ancient as86) in the Linux kernel contain
> .lines like the following:
> 
> ! bde - changed 0xff00 to 0x4000 to use debugger at 0x6400 up (bde).  We
> ! wouldn't have to worry about this if we checked the top of memory.  Also
> 
> 	mov	ax, #0xe05 + 'A - 1
> 	sub	al, cl
> 	int	0x10

It was a deliberate change and I have very little interest in
reverting it.  cpp is the *C* preprocessor.  It has been abused to
preprocess other stuff, but that other stuff needs to play by the
rules of C syntax, and that includes properly balanced single-quote
strings.

Your first example is inside a comment, and I could be convinced to
accept unbalanced strings in comments, but you have to tell me how
cpplib is to figure out that ! to end of line is a comment in this
file.

Note that the file you're quoting is dead in 2.3.

zw


More information about the Gcc-bugs mailing list