/*<br>     mm.cpp<br>*/<br>#include<iostream><br>using namespace std;<br>struct  xx{<br>int x;<br>        int mm()const;<br>        int mm();<br>};<br><br>int xx::mm() const<br>{<br>        return const_cast<xx*>(this)->mm();<br>}<br><br>int xx::mm()<br>{<br>        cout<<"ok"<<endl;<br>        return x;<br>}<br><br>int main()<br>{<br>        xx x;<br>        x.mm();<br>        return 0;<br>}<br><br>/*********************************************************************************************************************/<br><br>[ws@localhost dev]$ llvm-c++ --emit-llvm mm.cpp <br>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,<br>                 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,<br>                 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,<br>                 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,<br>                 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,<br>                 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,<br>                 from mm.cpp:1:<br>/usr/include/string.h:546: error: ¡®__locale_t¡¯ has not been declared<br>/usr/include/string.h:547: error: nonnull argument references non-pointer operand (argument 1, operand 3)<br>/usr/include/string.h:550: error: ¡®__locale_t¡¯ has not been declared<br>/usr/include/string.h:551: error: nonnull argument references non-pointer operand (argument 1, operand 4)<br><br>In my system , gcc-3.4.6 is used as default gcc tool;<br><br>thanks.<br><br><br><br><br>