
"Steve Cornett" <boost@bullseye.com> writes:
The file boost/preprocessor/stringize.hpp contains a trivial bug, for which I have attached a proposed patch. The problem is that there are three incorrect usages of the ## operator. The proposed fix is to simply remove the ## operators, as they are unnecessary.
The ## operator joins two tokens and makes a new single token. But all three usages of ## in this file attempt to join an identifier with '(', which does not result in a single token. The action taken by most C/C++ translators in this situation is to rescan the invalid text back into two tokens, which makes the incorrect ## usage innocuous in most situations. However, the behavior is undefined by the C++ and C standards. With our code coverage tool, this improper ## usage results in a warning.
Does your tool account for illegal code that may be necessary to work around buggy C++ [preprocessor] implementations? -- Dave Abrahams Boost Consulting www.boost-consulting.com