<br><br><div class="gmail_quote">2011/1/4 <span dir="ltr"><<a href="mailto:way_lzl@sina.com">way_lzl@sina.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<p>If I use MSVC's math.h, clang will report err I have formed a simple case to show it:</p>
<p> </p>
<p>struct _complex {<br> double x,y;<br> } ;</p>
<p> </p>
<p>#if SHOWERR<br>void foo( struct _complex _Complex) {<br> _Complex.x = 0;<br>}<br>#else<br>void foo( struct _complex cc) { <br> cc.x = 0;<br>}<br>#endif</p>
<p><br>int main()<br>{<br> struct _complex cc;<br> foo(cc);<br>}</p>
<p> </p>
<p>clang aa.cpp -DSHOWERR=1</p>
<p>aa.cpp(7) : error: '_Complex struct' is invalid<br>void foo( struct _complex _Complex) {<br> ^</p>
<p> </p>
<p>It seems _Complex is a reserved key word. Any suggestion?</p></blockquote><div><br></div><div> </div><div>yes clang considers _Complex to be a reserved keyword, MSVC don't. But _Complex is not in MSVC headers, it is in your cod right?</div>
<div>So you can rename that variable. Otherwise feel free to submit a PR or a patch.</div><div><br></div><div>We had the same problem with the _Bool keyword.</div></div><br>