Skip to content

[OpenMP] Fix a condition for KMP_OS_SOLARIS. #71831

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

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

xingxue-ibm
Copy link
Contributor

Line 75 of z_Linux_util.cpp checks #ifdef KMP_OS_SOLARIS which is always true regardless of the building platform because macro KMP_OS_SOLARIS is always defined in line 23 of kmp_platform.h: define KMP_OS_SOLARIS 0. This causes a compiler warning, such as the following on Linux.

.../llvm-project/openmp/runtime/src/z_Linux_util.cpp:77:9: warning: 'TIMEVAL_TO_TIMESPEC' macro redefined [-Wmacro-redefined]
   77 | #define TIMEVAL_TO_TIMESPEC(tv, ts)                                            \
      |         ^
/usr/include/sys/time.h:38:10: note: previous definition is here
   38 | # define TIMEVAL_TO_TIMESPEC(tv, ts) {                                   \
      |          ^

@xingxue-ibm xingxue-ibm added the openmp:libomp OpenMP host runtime label Nov 9, 2023
@xingxue-ibm xingxue-ibm requested a review from brad0 November 9, 2023 17:41
@xingxue-ibm xingxue-ibm self-assigned this Nov 9, 2023
@xingxue-ibm xingxue-ibm merged commit 90a9e9f into llvm:main Nov 9, 2023
zahiraam pushed a commit to zahiraam/llvm-project that referenced this pull request Nov 20, 2023
Line 75 of `z_Linux_util.cpp` checks `#ifdef KMP_OS_SOLARIS` which is
always true regardless of the building platform because macro
`KMP_OS_SOLARIS` is always defined in line 23 of `kmp_platform.h`:
`define KMP_OS_SOLARIS 0`.
@xingxue-ibm xingxue-ibm deleted the fix-solaris-if branch May 24, 2024 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomp OpenMP host runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants