[libcxx] r199494 - Build fix for gcc builtin

Joerg Sonnenberger joerg at britannica.bec.de
Fri Jan 17 08:06:53 PST 2014


On Fri, Jan 17, 2014 at 03:46:44PM +0000, Alp Toker wrote:
> 
> On 17/01/2014 14:43, Joerg Sonnenberger wrote:
> >On Fri, Jan 17, 2014 at 02:24:23PM -0000, Alp Toker wrote:
> >>Author: alp
> >>Date: Fri Jan 17 08:24:23 2014
> >>New Revision: 199494
> >>
> >>URL: http://llvm.org/viewvc/llvm-project?rev=199494&view=rev
> >>Log:
> >>Build fix for gcc builtin
> >>
> >>The __sync_add_and_fetch() builtin parameter is volatile but clang has
> >>'different' type checking and ends up accepting this code.
> >>
> >>Undo the C++ cast from r198505 to get libc++/LLVM building with g++ while this
> >>is investigated.
> >Please revert this. I gave you two options to deal with it -- the easy
> >workaround of adding the const cast and the harder option of merging the
> >implementation from libc++abi as Howard mentioned before. This change is
> >just hiding the issue again.
> 
> Okay, If you have a better build fix in mind could you look into
> that? I actually have little idea where you want to add that const
> cast -- be mindful that we work in different parts of the project
> and I gave a gentle heads up two weeks ago -- this is now starting
> to block gcc compatibility feature work in the clang frontend.

Given that I can't get your problem, it is a bit difficult. The cast
should be on on the p, before the sizeof is substracked.

Joerg



More information about the cfe-commits mailing list