[cfe-dev] libc++ does not throw an exception where libstdc++ does

Richard Smith richard at metafoo.co.uk
Sat Jun 29 11:51:14 PDT 2013


Your cyclic flag is uninitialized.
On 29 Jun 2013 11:34, "Shriramana Sharma" <samjnaa at gmail.com> wrote:

> Hello. I'm using Kubuntu Raring 64 bit with libstdc++ 4.8.1 (from the
> ubuntu-toolchain-r PPA) and Clang 3.2 (default Raring package). I have
> now built and installed libc++ from latest SVN revision 185264 against
> libsupc++ as per the instructions at libcxx.llvm.org.
>
> I find that the attached simple code prints the "out_of_range was
> thrown" message from within the catch block when compiled with
> libstdc++ but when compiled with libc++ it is not printed. Curiously,
> if the cout<< line (which I have commented out) in the try block is
> executed, then the exception is thrown and the message printed.
> Commenting out the cout<< line again makes the exception go away.
>
> I encountered this problem yesterday with some other code in my
> project but I wasn't able to provide a minimal example but this code
> is pretty minimal so I hope the problem can be identified easily and
> fixed.
>
> Thank you for Clang and libc++ -- it has already caught two instances
> of non-standards-compliance in my code which libstdc++ didn't.
>
> --
> Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130629/3a3f0d26/attachment.html>


More information about the cfe-dev mailing list