C++ preprocessor incorrectly handling 'L' character - by MASnelling

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 813595 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 1/13/2014 7:11:16 AM
Access Restriction Public


When compiling the test case below the preprocessor doesn't handle the 'L' character correctly and produces incorrect code.

#include <iostream>

#define A(i, j) const char *str##i = #j;

A(1, L?)
A(2, S?)

int main()
    std::cout << str1 << std::endl;
    std::cout << str2 << std::endl;
Sign in to post a comment.
Posted by Microsoft on 1/20/2014 at 11:49 AM
    Thanks for reporting the issue.
    A fix for this issue has been checked into the compiler sources. The fix should show up in the next major release of Visual C++.

Xiang Fan
Visual C++ Team
Posted by Microsoft on 1/14/2014 at 3:24 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 1/13/2014 at 7:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)