This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cpp using cpplib fails to preprocess asm code


* Zack Weinberg (zack@bitmover.com) [19991031 07:18]:

> 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.

Yep, I agree with you on that point.

 
> 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.

And it gets worse. arch/i386/kernel/head.S uses

  some  asmcode # this won't work on 486SX

So not only is it comment, but different styles of comment. For cpplib to
work, it would have to find out which asm comment chars are valid for a
given architecture. My knowledge regarding assembler programming is nearly
zero, so I'm not much help here.
 
> Note that the file you're quoting is dead in 2.3.

Yes, but distributions won't use experimental kernels, so this won't help
much. If and when as86/ld86 get replaced by as and ld for 2.2.X kernels the
problem will mostly disappear because as accepts 'A' -1, whereas as86
rejects it.


-- 
	Philipp Thomas <pthomas@suse.de>

	close the windows - the penguin is freezing


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]