Page MenuHomePhabricator

[OpenMP] Define __STDC_FORMAT_MACROS in callback.h

Authored by kkwli0 on Jul 5 2018, 11:22 AM.



The following test cases fail due to undefined PRIu64.


# command stderr:
In file included from /gsa/tlbgsa-h1/00/kli/clang-latest/llvm/projects/openmp/runtime/test/ompt/misc/interoperability.cpp:8:
/gsa/tlbgsa/home/k/l/kli/clang-latest/llvm/projects/openmp/runtime/test/ompt/callback.h:1:9: warning: '_BSD_SOURCE' macro redefined [-Wmacro-redefined]
#define _BSD_SOURCE
/usr/include/features.h:176:10: note: previous definition is here
# define _BSD_SOURCE    1
In file included from /gsa/tlbgsa-h1/00/kli/clang-latest/llvm/projects/openmp/runtime/test/ompt/misc/interoperability.cpp:8:
/gsa/tlbgsa/home/k/l/kli/clang-latest/llvm/projects/openmp/runtime/test/ompt/callback.h:85:16: error: expected ')'
    printf("%" PRIu64 ": task level %d: parallel_id=%" PRIu64
/gsa/tlbgsa/home/k/l/kli/clang-latest/llvm/projects/openmp/runtime/test/ompt/callback.h:85:11: note: to match this '('
    printf("%" PRIu64 ": task level %d: parallel_id=%" PRIu64
/gsa/tlbgsa/home/k/l/kli/clang-latest/llvm/projects/openmp/runtime/test/ompt/callback.h:198:18: error: expected ')'
      printf("%" PRIu64 ": ompt_event_wait_lock: wait_id=%" PRIu64 ", hint=%" PRIu32 ", impl=%" PRIu32 ", codeptr_ra=%p \n", ompt_get_thread_data()->value, wait_id, hint, impl, codeptr_ra);

Diff Detail

Event Timeline

kkwli0 created this revision.Jul 5 2018, 11:22 AM
kkwli0 created this object with visibility "Restricted Project (Project)".
kkwli0 edited the summary of this revision. (Show Details)Jul 5 2018, 11:23 AM
kkwli0 changed the visibility from "Restricted Project (Project)" to "Public (No Login Required)".Jul 5 2018, 11:26 AM
This revision is now accepted and ready to land.Jul 5 2018, 11:57 AM
This revision was automatically updated to reflect the committed changes.