[LLVMdev] Different behavoir when writing to stdout with 2 raw_fd_ostreams with or w/o redirection

Dan Gohman dan433584 at gmail.com
Thu Nov 29 13:20:06 PST 2012


On Thu, Nov 29, 2012 at 11:03 AM, Dmitry N. Mikushin <maemarcus at gmail.com>wrote:

> Hi Dan, Sean,
>
> Thanks for replies,
>
> So does it mean user is not expected to use any other stream for stdout,
> but outs()? Although there is a comment "If you don't want this behavior,
> don't use outs().", outs() is a static instance which always exists and
> creates problems, even if not used.


If you don't call outs(), its static object isn't constructed (or
destructed).

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121129/54537be9/attachment.html>


More information about the llvm-dev mailing list