<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’ve been updating SAFECode files to work with LLVM 3.7, and I’ve run into a number of errors I can’t explain.<div class=""><br class=""></div><div class=""><div class="">In LLVM_SRC/projects/safecode/runtime/BBRuntime/DebugReport.cpp, there are a host of std::ostream objects that, when given strings with the “<<“ operator, produce errors. Also, the compiler doesn’t seem to recognize std::dec for some reason. Here is a sample of the errors I’m getting:</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/runtime/BBRuntime/DebugReport.cpp:30:6: </b><span class="" style="color: rgb(195, 55, 32);"><b class="">error: </b></span><b class="">invalid operands to binary expression</b></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"><b class=""> ('std::ostream' (aka 'basic_ostream<char>') and 'const char *')</b></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"> OS << "= Fault PC Source :\t"</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);"><b class=""> ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</b></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"><b class="">/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:5263:1: note: </b>candidate template ignored: could not match</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"> 'shared_ptr<type-parameter-0-2>' against 'char const[43]'</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p);</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);"><b class="">^</b></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"><b class="">/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:4191:1: note: </b>candidate template ignored: could not match</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"> 'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'char const[43]'</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">operator<<(basic_ostream<_CharT, _Traits>& __os,</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);"><b class="">^</b></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/runtime/BBRuntime/DebugReport.cpp:32:20: </b><span class="" style="color: rgb(195, 55, 32);"><b class="">error: </b></span><b class="">no member named 'dec' in namespace 'std'</b></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"> << ":" << std::dec << this->lineNo << "\n";</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);"><b class=""> ~~~~~^</b></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/runtime/BBRuntime/DebugReport.cpp:38:6: </b><span class="" style="color: rgb(195, 55, 32);"><b class="">error: </b></span><b class="">invalid operands to binary expression</b></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"><b class=""> ('std::ostream' (aka 'basic_ostream<char>') and 'const char *')</b></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"> OS << "= Pool Handle :\t" << this->PoolHandle << "\n";</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);"><b class=""> ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</b></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"><b class="">/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:5263:1: note: </b>candidate template ignored: could not match</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"> 'shared_ptr<type-parameter-0-2>' against 'char const[43]'</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p);</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);"><b class="">^</b></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"><b class="">/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:4191:1: note: </b>candidate template ignored: could not match</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"> 'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'char const[43]'</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">operator<<(basic_ostream<_CharT, _Traits>& __os,</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);"><b class="">^</b></div></div><div class=""><b class=""><br class=""></b></div><div class="">I’ve been trying to find information online, but I’ve found nothing helpful. I tried creating my own test programs, with my own std::ostream objects, but I couldn’t recreate the errors. Do you have any idea what could be causing this problem?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Peter Finn</div></div></body></html>