bloomberg/bsl — pull request #96 by gstrauss (2013-11-11 08:22:59+00:00)
Title: remove xlC -qalias=noansi flag; workaround xlC new

xlC placement new operator is inlined and does not appear to
interoperate well with bsls_objectbuffer. However,
#define __IBM_ALLOW_OVERRIDE_PLACEMENT_NEW
allows bsl test drivers to pass POWER AIX xlC without -qalias=noansi
except for bsltf_templatetestfacility.t.cpp. Alternatively, the
introduction of a compiler optimization fence (xlC __fence())
following each call to placement new in bslalg_scalarprimitives.h
and in bslma_destructorguard.t.cpp allows all bsl test drivers to pass.
Using both workarounds is recommended until the interaction between
bsls_objectbuffer and xlC placement new is understood more precisely.

IBM documents #define __IBM_ALLOW_OVERRIDE_PLACEMENT_NEW as follows:
"Can be used to obtain the behavior of global placement new operators.
By default, this macro is not predefined, and the Standard C++ Library
provides the inlined version of global placement new operators, which
can assist with improving performance."