diff options
author | Jeffrey Walton <noloader@gmail.com> | 2015-07-31 10:22:15 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2015-07-31 10:22:15 -0400 |
commit | b1085b7384d91fb81e4e66e3bcd57f5900d83984 (patch) | |
tree | 2b99d612acfee2da7b09fd41b9d92c861b0ec8b4 /smartptr.h | |
parent | 5f2c32af37152da7607c25df82b392597d05a3c9 (diff) | |
download | cryptopp-git-b1085b7384d91fb81e4e66e3bcd57f5900d83984.tar.gz |
Changed Cygwin to use -O2 instead of -O3 with GCC 4.9 due to crash
Diffstat (limited to 'smartptr.h')
-rw-r--r-- | smartptr.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -79,6 +79,12 @@ public: T *old_p = m_p; m_p = 0; return old_p; + +#ifdef __GNUC__ + // From Andrew Haley (GCC Dev), to tame the optimizer so the assignment is always performed. + // See "Disable optimizations in one function" on the GCC mailing list. + asm volatile ("" : : : "memory"); +#endif } void reset(T *p = 0); |