[cfe-dev] clang compiling complex reports err
way_lzl at sina.com
way_lzl at sina.com
Tue Jan 4 00:13:39 PST 2011
If I use MSVC's math.h, clang will report err I have formed a simple case to show it:
struct _complex {
double x,y;
} ;
#if SHOWERR
void foo( struct _complex _Complex) {
_Complex.x = 0;
}
#else
void foo( struct _complex cc) {
cc.x = 0;
}
#endif
int main()
{
struct _complex cc;
foo(cc);
}
clang aa.cpp -DSHOWERR=1
aa.cpp(7) : error: '_Complex struct' is invalid
void foo( struct _complex _Complex) {
^
It seems _Complex is a reserved key word. Any suggestion?
Thanks
--------------------------------
--Zhanglin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110104/7bc6216f/attachment.html>
More information about the cfe-dev
mailing list