[cpp-threads] Yet another visibility question

Lawrence Crowl Lawrence at Crowl.org
Wed Dec 20 00:14:26 GMT 2006


On 12/19/06, Boehm, Hans <hans.boehm at hp.com> wrote:
> This does seem to be (barely) implementable, since the load_raw
> optimization impact is contained to the function and hence compilation
> unit in which it is contained.  But it has several remaining problems.
> I think the showstopper is that even the first example breaks if I make
> the load_raw call in a separate function.  Hence I would expect it to
> only work in practice for badly structured code.

I don't think we can rely on any notion of separate compilation or
separate functions.  Inter-procedural and inter-object optimization
is sufficiently common so that the compiler will have essentially
random visibility.

-- 
Lawrence Crowl



More information about the cpp-threads mailing list