「view this page in B3 βῆτα server」

Revisions №60459

branch: master 「№60459」
Commited by: Vikram K. Mulligan
GitHub commit link: 「43c8c1ca0b7cf4be」 「№3564」
Difference from previous tested commit:  code diff
Commit date: 2018-10-19 00:16:01

Merge pull request #3564 from RosettaCommons/vmullig/fix_signed_char_issue Fixing an issue with assignment of -1 to a char According to the C++ standard, the `char` type can be signed or unsigned -- it's up to the implementation. We have a spot in the Rosetta code where -1 is assigned to a `char`, and although that's fine for compilation on most systems, it breaks the Blue Gene/Q build. (It also likely breaks Android builds -- they also tend to default to `char == unsigned char`.) The simple fix is to declare this `char` to be `signed` explicitly. In general, if you assign numeric values to a `char` or do math other than just incrementing or decrementing, it's a good idea to make it explicit whether you're working with a signed or unsigned `char`.

...