On Tuesday, June 14, 2016 at 7:46:53 AM UTC-4, Jeffrey Walton wrote: > > Hi Everyone, > > Integer class took a bug report under Sun Studio 12.4. Also see Issue 184: > Error: > The operand "___LKDB" cannot be assigned to ( > http://github.com/weidai11/cryptopp/issues/188). > > Sun CC 12.4 is an important Sun compiler because its their C++11 compiler. > I'm fairly certain the bug report is bogus, and its a compiler bug. Never > the less, we had to work around it. > > The hack is available at > http://github.com/weidai11/cryptopp/commit/7e06c1dce4b0ebc89708ba7afbcc23ff9093f4ea. > > The essence of the hack is: > > #if (__SUNPRO_CC == 0x5130) > # define MAYBE_CONST > #else > # define MAYBE_CONST const > #endif >
This was changed a small bit: #if (__SUNPRO_CC == 0x5130) # define MAYBE_CONST # define MAYBE_UNCONST_CAST const_cast<word*> #else # define MAYBE_CONST const # define MAYBE_UNCONST_CAST #endif It allows us to avoid the un-const cast completely if its not needed. It gets used as expected: void Baseline_Square2(word *R, const word *AA) { // http://github.com/weidai11/cryptopp/issues/188 MAYBE_CONST word* A = MAYBE_UNCONST_CAST(AA); Squ_2 } Also see http://github.com/weidai11/cryptopp/commit/c042616ba5951c843a9b6e2d1c7f7b5a3893ccb9. To test these changes, jump on the Solaris branch with 'git checkout solaris'. Or, visit GitHub, select Solaris from the drop down, then select Download ZIP. Jeff -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.