forked from Tencent/rapidjson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace RAPIDJSON_CLZLL with internal clzll (Tencent#1660)
RAPIDJSON_CLZLL is defined as macro of __builtin_clzll when using gcc to compile. This introduces two issues: 1. in gcc __builtin_clzll returns int, not uint32_t. 2. __builtin_clzll return is undefined when input x is 0 See: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html This patch removes RAPIDJSON_CLZLL, merges __builtin_clzll to internal clzll with input check and return value explicit cast. Change-Id: Iac4b355dc5e5b4ed9b3f35a640b6b5537e76f22c Signed-off-by: Jun He <[email protected]> Co-authored-by: Jun He <[email protected]>
- Loading branch information
Showing
4 changed files
with
18 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters