EnigmaTriton commented on pull request #2305:
URL: https://github.com/apache/thrift/pull/2305#issuecomment-757359214


   Regarding the compilers behavior, some of them do have flags to enforce some 
behavior or another.
   
   In particular GCC has -fwrapv and -ftrapv (which seem to be valid for Clang 
as well but I did not check the documentation).
   -fwrapv explicitly requires the behavior we expect
   -ftrapv explicitly forbids overflow (and if company policy enforce this 
flag, we're doomed at the 10th or 11th command sent).
   
   Some compilers (MSVC) don't have any flag and just let the processor do what 
it wants (undefined = I don't care what happens, which is a perfectly 
acceptable behavior for the compiler).
   
   That's why I think it's better to do the check ourselves.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to