PRB: Stringize Operator Fails to Insert Backslashes (68143)
The information in this article applies to:
- Microsoft Visual C++ 1.0
- Microsoft Visual C++ 1.5
- Microsoft Visual C++ 2.0
- Microsoft Visual C++ 2.1
- Microsoft Visual C++ 4.0
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q68143 SYMPTOMS
The Microsoft C and C/C++ compilers support the use of the stringizing
preprocessor operator only in macros that take arguments. If a # precedes a
formal parameter in the definition of a macro, the actual argument is
enclosed in double quotation marks and treated as a string when the macro
is expanded.
If the argument contains characters that normally must be preceded by a
backslash (\) when appearing in a string (such as " or \), the backslash
should be automatically inserted. However, there are many cases where the
preprocessor fails to do this.
STATUS
This behavior is by design.
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbLangC kbprb KB68143 |
---|
|