G
Guest
/// Compile with "cl /Zc:wchar_t /clr bug.cpp"
#include <stdio.h>
#include <string.h>
#define TEST const wchar_t* p = wcschr( L"aa:aa", L':' ); printf(
"%ls\n", p );
#pragma managed
void f_managed()
{
TEST
}
#pragma unmanaged
void f_unmanaged()
{
TEST
}
#pragma managed
void main()
{
f_managed();
f_unmanaged();
}
Results:
(null)
:aa
#include <stdio.h>
#include <string.h>
#define TEST const wchar_t* p = wcschr( L"aa:aa", L':' ); printf(
"%ls\n", p );
#pragma managed
void f_managed()
{
TEST
}
#pragma unmanaged
void f_unmanaged()
{
TEST
}
#pragma managed
void main()
{
f_managed();
f_unmanaged();
}
Results:
(null)
:aa