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

intptr_t is wrong size on x86_64 #69

Open
pbcornell opened this issue Sep 18, 2017 · 0 comments
Open

intptr_t is wrong size on x86_64 #69

pbcornell opened this issue Sep 18, 2017 · 0 comments

Comments

@pbcornell
Copy link

  • intptr_t is an integer that is at least as big as the largest pointer. So, the %d is technically fine on i386 GCC (sizeof(intptr_t) == sizeof(int)), but should be %lld on x86_64 GCC (sizeof(intptr_t) == sizeof(int)). Really, we probably should be using the PRIdPTR macro from inttypes.h to be portable, so this is definitely a bug.
      intptr_t val = ...;
      printf("VALUE: %" PRIdPTR  "\n", val);
  • The gmtime_r call is a good call out--the CMake C_STANDARD option with 99 uses -std=gnu99.
  • We'll have to evaluate the downgrade of CMake and passing the CFLAGS in, I'm not sure this is the right thing to do.
  • Consider requiring use of CMake >= 3.5 (note that 3.5 is not available on Ubuntu 14.04).
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