[LLVMdev] 回复:[LLVMdev] Dose I need to build llvm-gcc front-end from source to resolve this error?
Sheng Wang
wansheg at gmail.com
Fri Sep 4 00:51:10 PDT 2009
sorry ! I have re-corrected the title.
------------------ 原始邮件 ------------------
发件人: "Sheng Wang"<wansheg at gmail.com>;
发送时间: 2009年9月4日(星期五) 下午3:23
收件人: "LLVMdev"<LLVMdev at cs.uiuc.edu>;
主题: [LLVMdev] Dose I need to build llvm-gcc front-end from sourceresolve this error?
/*
mm.cpp
*/
#include<iostream>
using namespace std;
struct xx{
int x;
int mm()const;
int mm();
};
int xx::mm() const
{
return const_cast<xx*>(this)->mm();
}
int xx::mm()
{
cout<<"ok"<<endl;
return x;
}
int main()
{
xx x;
x.mm();
return 0;
}
/*********************************************************************************************************************/
[ws at localhost dev]$ llvm-c++ --emit-llvm mm.cpp
In file included from /home/ws/software/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/cstring:52,
from /home/ws/software/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/i686-pc-linux-gnu/bits/c++locale.h:47,
from /home/ws/software/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/iosfwd:45,
from /home/ws/software/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/ios:43,
from /home/ws/software/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/ostream:45,
from /home/ws/software/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/iostream:45,
from mm.cpp:1:
/usr/include/string.h:546: error: ‘__locale_t’ has not been declared
/usr/include/string.h:547: error: nonnull argument references non-pointer operand (argument 1, operand 3)
/usr/include/string.h:550: error: ‘__locale_t’ has not been declared
/usr/include/string.h:551: error: nonnull argument references non-pointer operand (argument 1, operand 4)
In my system , gcc-3.4.6 is used as default gcc tool;
thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090904/f2163beb/attachment.html>
More information about the llvm-dev
mailing list