<div dir="ltr">Hi, <div><br></div><div>I just stat using clang 8 not long ago. I  need to compile our old c++ source without changing it. It is compiled with Visual Studio before. Now I want to migrate to clang as the compiler.</div><div><br></div><div>The following code segement can be compiled by clang:</div><div><br></div><div>1)  for (int i = 0 ; i < 6 ; i++ ) {</div><div>        ....</div><div>     }</div><div>     int k = i ;  // compiler error</div><div><br></div><div>2) unsigned short *s = ....</div><div>    wchar_t  *t = s ; // compiler error</div><div><br></div><div>I tried -ffor-scope and -fshort-wchar, but does not solve the issues.</div><div><br></div><div>are there clang compilation options to solve the issues?</div><div><br></div><div>Thanks for your help very much,</div><div><br></div><div>Guofeng</div></div>