[cfe-dev] Using Clang to compile LLVM against gcc 5.3's libstdc++ fails

Andrey Bokhanko via cfe-dev cfe-dev at lists.llvm.org
Tue Jan 5 02:37:53 PST 2016


Hi Keno,

This is due to clang parsing templates when they occur, while gcc
delays parsing until instantiation. Thus, if a template is not used,
gcc never parses it and never reports an error.

Try to use -fdelayed-template-parsing as a workaround.

Richard,

Do we want clang to correctly compile such headers? If yes, we (Intel)
can submit a patch.

Andrey
======
Software Engineer
Intel Compiler Team
Intel


On Sun, Jan 3, 2016 at 6:23 PM, Keno Fischer via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> I'm attempting to use clang (trunk) to compile LLVM for mingw-w64 (with gcc
> 5.3.0 and corresponding standard library).
>
> Clang spits out the following error while g++ accepts it fine (though gcc 5
> is known to miscompile LLVM on mingw, which is why I'm attempting to use
> clang in the first pace): https://gist.github.com/Keno/519b707c0caf8ed915d3.
>
> Is this something that clang should be accepting but doesn't for some
> reason, or is there a bug in libstdc++ that gcc is just not complaining
> about? I also tried dropping in gcc trunk's header, but that doesn't seem to
> have made a difference?
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>



More information about the cfe-dev mailing list