[cfe-dev] How do I try out C++ modules with clang?

Seth Cantrell seth.cantrell at gmail.com
Thu Oct 23 16:15:57 PDT 2014


> On Oct 23, 2014, at 5:09 PM, Sean Silva <chisophugis at gmail.com> wrote:
> 
> 
> 
> On Wed, Oct 22, 2014 at 9:09 PM, Seth Cantrell <seth.cantrell at gmail.com <mailto:seth.cantrell at gmail.com>> wrote:
> I saw this error when I tried out -fmodules on OS X earlier as well, but it disappeared and I took it to be transient and due to something in my build of llvm/clang/libcxx. Now of course I'm seeing it again and I have no idea what allowed -fmodules to work for me before.
> 
> I tried Sean's suggestion of "moving `#include <__locale>` below `#include <cstdlib>`". To get things to build I had to put both of the following:
> 
>     #include <cstdlib>
>     #include <xlocale/_stdlib.h>
> 
> before `#include <__locale>` in the `<locale>` header. Since `<xlocale/_stdlib.h>` is not in a module map (AFAICT, MacOSX10.10.sdk/usr/include/module.map does not mention the xlocale headers in the 10.10 SDK) I believe the included declarations become part of the `<locale>` module...
> 
> You may want to file a bug with Apple about this issue with the system headers. This issue seems like it would affect C/ObjC (which are officially supported) just the same as C++.

Done.

> 
> -- Sean Silva
>  
> 
> > On Oct 21, 2014, at 7:57 AM, Stephen Kelly <steveire at gmail.com <mailto:steveire at gmail.com>> wrote:
> >
> > /Users/ske/dev/prefix/bin/../include/c++/v1/locale:943:28: error: use of
> > undeclared identifier 'strtold_l'
> >        long double __ld = strtold_l(__a, &__p2, _LIBCPP_GET_C_LOCALE);
> >                           ^
> > test.cpp:6:10: fatal error: could not build module 'std'
> > #include <utility>
> > ~~~~~~~~^
> >
> >
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu <mailto:cfe-dev at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev <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/20141023/d8420b29/attachment.html>


More information about the cfe-dev mailing list