-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid warnings when compiling under Wpedantic
#437
Changes from 1 commit
5a6dea3
6d628d6
acc7758
4b5e033
a28c53c
5f6ec19
43b4edf
da0746b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,8 +36,8 @@ | |
#define LIMB_BITS (1 << LIMB_LOG2_BITS) | ||
|
||
#if LIMB_BITS == 64 | ||
typedef __int128 int128_t; | ||
typedef unsigned __int128 uint128_t; | ||
__extension__ typedef __int128 int128_t; | ||
__extension__ typedef unsigned __int128 uint128_t; | ||
typedef int64_t slimb_t; | ||
typedef uint64_t limb_t; | ||
typedef uint128_t dlimb_t; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change OK as long as We should probably not define There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Great! Just to clarify though,
According to GCC, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Good to know, I had no idea!
Do any implementations provide Testing with the latest clang & gcc, the only int128-related define is
Apparently this is defined from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quoting the C23 standard:
This makes For some reason, neither gcc not clang define Using different identifiers would avoid potential potability issues and testing for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Ah apologies, I misunderstood. For the current changes, should I also add the change to the #ifndef INT128_MAX
__extension__ typedef __int128 int128_t;
__extension__ typedef unsigned __int128 uint128_t;
#endif
typedef int128_t bf_int128_t;
typedef uint128_t bf_uint128_t; Or was there a different naming scheme for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, only add the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No worries, current changes should be good to go then |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was definitely an oversight. Should have used
uint128_t
from day one.