[cfe-dev] Problem with new C++17 noexcept rules

Richard Smith via cfe-dev cfe-dev at lists.llvm.org
Tue Nov 29 16:24:33 PST 2016


Sorry for the delay, that should be fixed in r288220.

On 4 November 2016 at 09:58, Pavel A. Lebedev via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> On Thu, Nov 3, 2016 2:19 AM, Richard Smith via <cfe-dev at lists.llvm.org>
> wrote:
> > I fixed this in r285779.
>
> Thanks, that fixes the problem I reported, but there's more:
>
> $ cat d2.cpp
>
> #include <xmmintrin.h>
>
> $ clang++ -std=c++1z -fno-exceptions -fsyntax-only d2.cpp
>
> In file included from d.cpp:1:
> In file included from /usr/bin/../lib/clang/4.0.0/include/xmmintrin.h:39:
> /usr/bin/../lib/clang/4.0.0/include/mm_malloc.h:39:16: error: conflicting
> types for 'posix_memalign'
> extern "C" int posix_memalign(void **__memptr, size_t __alignment, size_t
> __size);
>                ^
> /usr/include/stdlib.h:503:12: note: previous declaration is here
> extern int posix_memalign (void **__memptr, size_t __alignment, size_t
> __size)
>            ^
> 1 error generated.
>
> The second file comes from glibc 2.23. The rest of the declaration
> (not shown in the error message above) contains a macro that expands
> to throw() when compiled with C++ compiler, whatever that means for
> an extern "C" function (which it is due to being inside extern "C" {}
> block, also not shown above). The first declaration has no explicit
> exception specification. As with the previous case, the error disappears
> if one omits -fno-exceptions.
>
> ---
> Pavel A. Lebedev
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20161129/99fb4551/attachment.html>


More information about the cfe-dev mailing list