[LLVMbugs] [Bug 16412] New: C++11 library error on OS X 10.8.4

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 21 15:27:32 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16412

            Bug ID: 16412
           Summary: C++11 library error on OS X 10.8.4
           Product: clang
           Version: 3.3
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: kmowery at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10734
  --> http://llvm.org/bugs/attachment.cgi?id=10734&action=edit
Exception from the c++ library on OS X 10.8 with XCode 4.6.3 installed

Compiling a C++11 test case with llvm-3.3 fails on OSX 10.8.4 with XCode 4.6.3
installed:

$ cat test.cpp
#include <map>
int main(void) {return 1;}

$ llvm-3.3-build/Release+Asserts/bin/clang -std=c++11 -stdlib=libc++ test.cpp
In file included from test.cpp:2:
In file included from /usr/lib/c++/v1/map:371:
In file included from /usr/lib/c++/v1/__tree:16:
In file included from /usr/lib/c++/v1/memory:590:
In file included from /usr/lib/c++/v1/typeinfo:61:
/usr/lib/c++/v1/exception:146:5: error: an attribute list cannot appear here
    _LIBCPP_NORETURN friend void rethrow_exception(exception_ptr);
    ^~~~~~~~~~~~~~~~
/usr/lib/c++/v1/__config:190:28: note: expanded from macro '_LIBCPP_NORETURN'
#  define _LIBCPP_NORETURN [[noreturn]]
                           ^~~~~~~~~~~~
1 error generated.
$ llvm-3.2-build/Release+Asserts/bin/clang -std=c++11 test.cpp
$
======================

Removing the "-std=c++11" solved the problem. I've attached the "exception"
file from my local machine.

I'm not sure if the file is valid C++11, so this bug might need to be filed
with Apple. However, it compiles properly with vanilla llvm-3.2.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130621/e389c17b/attachment.html>


More information about the llvm-bugs mailing list