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

Fix errors and most warnings when compiling with gcc 5.3.1, add results for corei7-6700K #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

amdn
Copy link

@amdn amdn commented Mar 19, 2016

These are the changes I made to get a clean build using gcc 5.3.1 on Fedora 23.
There are a couple of warnings regarding members of a union being possibly uninitialized that I didn't fix because I don't understand the code:

../../src/gay/dtoa.c:3392:8: warning: ‘rv0.L[1]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (word0(&rv0) == Big0 && word1(&rv0) == Big1)
        ^
../../src/gay/dtoa.c:2503:20: note: ‘rv0.L[1]’ was declared here
  U aadj2, adj, rv, rv0;
                    ^
../../src/gay/dtoa.c: In function ‘dtoa’:
../../src/gay/dtoa.c:3988:28: warning: ‘j1’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     dval(&eps1) *= tens[j1 & 0xf];
                            ^

@wojdyr
Copy link
Contributor

wojdyr commented May 29, 2017

it'd be good to merge this PR as otherwise the benchmark doesn't compile with GCC5 and GCC6 and supposedly newer GCC versions

$ make config=release64 verbose=1
==== Building dtoa (release64) ====
emyg_dtoa.c
cc -MMD -MP -D__STDC_FORMAT_MACROS=1 -DNDEBUG   -Wall -O2 -m64 -msse4.2 -Wall -Wextra -o "../../intermediate/release/gmake/dtoa/x64/emyg_dtoa.o" -c "../../src/emyg/emyg_dtoa.c"
../../src/emyg/emyg_dtoa.c:54:36: error: initializer element is not constant
 static const int kDpExponentBias = 0x3FF + kDpSignificandSize;
                                    ^
../../src/emyg/emyg_dtoa.c:55:35: error: initializer element is not constant
 static const int kDpMinExponent = -kDpExponentBias;
                                   ^
../../src/emyg/emyg_dtoa.c: In function ‘DiyFp_multiply’:
../../src/emyg/emyg_dtoa.c:104:20: error: expected ‘)’ before numeric constant
  if (l & (uint64_t(1) << 63)) // rounding
                    ^
../../src/emyg/emyg_dtoa.c:104:23: error: expected ‘)’ before ‘<<’ token
  if (l & (uint64_t(1) << 63)) // rounding
                       ^
../../src/emyg/emyg_dtoa.c:106:29: error: ‘e’ undeclared (first use in this function)
  return DiyFp_from_parts(h, e + rhs.e + 64);

@erthink
Copy link

erthink commented Apr 12, 2019

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

Successfully merging this pull request may close these issues.

None yet

3 participants