This is an archive of the discontinued LLVM Phabricator instance.

[Mips] Fix type of 64-bit integer in case of MIPS N64 ABI
ClosedPublic

Authored by atanasyan on Jan 22 2015, 8:47 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

atanasyan updated this revision to Diff 18616.Jan 22 2015, 8:47 AM
atanasyan retitled this revision from to [Mips] Fix type of 64-bit integer in case of MIPS N64 ABI.
atanasyan updated this object.
atanasyan edited the test plan for this revision. (Show Details)
atanasyan added a reviewer: dsanders.
atanasyan added a subscriber: Unknown Object (MLST).
dsanders accepted this revision.Jan 22 2015, 11:59 AM
dsanders edited edge metadata.

Thanks for fixing this so quickly. LGTM with a small correction. We haven't changed 'long long' itself so we shouldn't change its LL constant suffix on LONG_LONG_MAX to L.

test/Preprocessor/init.c
3739 ↗(On Diff #18616)

This one should stay as LL since we haven't changed long long itself.

3947 ↗(On Diff #18616)

This one should stay LL since we haven't changed long long itself

This revision is now accepted and ready to land.Jan 22 2015, 11:59 AM
dsanders added a subscriber: hans.Jan 22 2015, 12:09 PM

@hans: Would you be happy for me to merge this to the branch after it's been committed and gone through buildbot?

It fixes a warning:

tmp.c:6:19: warning: format specifies type 'intmax_t' (aka 'long long') but the argument has type 'intmax_t' (aka 'long') [-Wformat]
  printf("%jd\n", a);
          ~~~     ^
          %jd

emitted when compiling:

#include <stdio.h>
#include <stdint.h>
int main(void) {
  intmax_t a = 0;
  printf("%jd\n", a);
  return 0;
}
This revision was automatically updated to reflect the committed changes.
hans added a comment.Jan 22 2015, 6:26 PM

Merged in r226894.

Thanks,
Hans