-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Compile warning on architectures that are not x86 #1939
Comments
The example is a warning that only becomes in array with |
(I am also not sure all non-x86 machines have this error, because we can compile successfully on ARM, see https://github.com/nlohmann/json#supported-compilers) |
Yes it should, sorry should have been explicit about that detail. The project we are using the library on has this enabled by default and I forgot about it.
Older versions of the g++ compiler do indeed compile fine for all architectures we compile for. We have been compiling an older version of the library on quite a few different architectures for the past couple of years. I updated to the latest json release and re-ran before submitting this issue. I believe this is a new check added with the most recent g++ which is now flagging this. IMHO it would be better to be explicit if characters should be signed or unsigned and make changes to accommodate whatever decision is chosen instead of leaving it up as an implementation detail of the tooling. |
Thanks for checking back. I'll have a look at #1940. |
I tried to reproduce the problem locally and compiled the library successfully with
I got no error in either setting. Any ideas? |
Here is the actual builds that failed: https://koji.fedoraproject.org/koji/taskinfo?taskID=41468709 Details of the command line option for the failure, snippet from here
I think to get this to re-create may require gcc 10.0.1 which I don't think has been released yet. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Due to `-Werror`, this fails to build on gcc >= 10.0.1. This has been [reported][0] to json upstream, and fixed in this [pr][1]. Backport the fix to horizon [0]:nlohmann/json#1939 [1]:nlohmann/json#2144
Compiling library results in a compiler
errorwarning which using the latest compilers on non-x86 architectures using the gcc compiler included in fedora 32 aka. rawhide.Simply try to compile the library.
Compile success
Compile
errorwarningNot listed on the supported compilers. Fedora rawhide, which I believe is using GCC 10.0.1.
develop
branch?Used latest release.
I can for x86, but not easily for other architectures at the moment.
The text was updated successfully, but these errors were encountered: