Subject: Making the (asm) world safe for modern cpp
To: None <>
From: Jim Wise <>
List: tech-toolchain
Date: 09/17/2003 14:02:18
Hash: SHA1

Currently, asm sources which are processed with cpp (.S) files are run
through `-traditional-cpp', rather than modern cpp.  This should change,
as `-traditional-cpp' will _eventually_ go away, and as it leads to
subtle differences in macro expansion between c and assembly source

One of the main reasons for this behavior is that many of our assembly
source files use a mix of `/**/'-style and `#'-style comments.  Where
`#'-style comments appear on a line by themselves, modern cpp is
confused, while `-traditional-cpp' is not as long as the `#' does not
appear in the first character position on the line.

I therefore propose the following sequence of events to eliminate use of
`-traditional-cpp' in our source tree:

a.) I will modify all .S assembly source files to consistently use
    `/**/'-style comments.

b.) When this is done, rendering the tree buildable without `cpp
    -traditional', I will issue a warning that portmasters should check
    their ports for any hidden dependencies on traditional cpp behavior
    in assembly sources.  Such dependencies would need to be removed in
    _any_ case, as they lead to counter-intuitive and hard-to-debug

c.) a week later, I will modify src/share/mk/ to eliminate use
    of the `-traditional-cpp' flag when preprocessing .S assembly source

Any Comments?  Proposed improvements?  Objections?

Barring the latter, I will do this work this weekend, three-to-four days
from now.

- -- 
				Jim Wise
Version: GnuPG v1.2.3 (NetBSD)