Skip to content
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

Compiler warnings with both Givaro and FLINT 3.1.0 (longlong.h v reclonglong.h) #228

Open
d-torrance opened this issue Mar 5, 2024 · 0 comments

Comments

@d-torrance
Copy link
Contributor

When compiling a simple program with both Givaro and FLINT headers after the recent FLINT 3.1.0 release, I get the following compiler warnings if the Givaro headers are included before the FLINT headers (but not the other way around):

$ g++ foo.cpp
In file included from foo.cpp:7:
flint/longlong.h:74: warning: "__ll_B" redefined
   74 | #define __ll_B ((ulong) 1 << (FLINT_BITS / 2))
      | 
In file included from foo.cpp:5:
/usr/include/recint/reclonglong.h:46: note: this is the location of the previous definition
   46 | #define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2))
      | 
flint/longlong.h:75: warning: "__ll_lowpart" redefined
   75 | #define __ll_lowpart(t) ((ulong) (t) & (__ll_B - 1))
      | 
/usr/include/recint/reclonglong.h:47: note: this is the location of the previous definition
   47 | #define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1))
      | 
flint/longlong.h:76: warning: "__ll_highpart" redefined
   76 | #define __ll_highpart(t) ((ulong) (t) >> (FLINT_BITS / 2))
      | 
/usr/include/recint/reclonglong.h:48: note: this is the location of the previous definition
   48 | #define __ll_highpart(t) ((UWtype) (t) >> (W_TYPE_SIZE / 2))
      | 

There have been similar issues with these two header files in the past -- see #99 and #137.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant