[Openmp-dev] warnings in omp.h from Clang
Stephen Siegel via Openmp-dev
openmp-dev at lists.llvm.org
Thu Jun 25 08:37:09 PDT 2020
Hello,
I’ve installed Clang 9.0 on my Mac using MacPorts. When I compile a C/OpenMP program with the flag -pedantic, I get 4 warnings, all of the same kind, in omp.h, e.g. "ISO C restricts enumerator values to range of 'int' (2147483648 is too large)”. An example is below. Do other people get this, or am I doing something wrong?
Thanks,
Steve
basie:diffusion1d siegel$ cat exp.c
#include <omp.h>
int main() {
}
basie:diffusion1d siegel$ clang-mp-9.0 -fopenmp -pedantic exp.c
In file included from exp.c:1:
/opt/local/include/libomp/omp.h:53:9: warning: ISO C restricts enumerator values to range of 'int'
(2147483648 is too large) [-Wpedantic]
omp_sched_monotonic = 0x80000000
^ ~~~~~~~~~~
/opt/local/include/libomp/omp.h:302:7: warning: ISO C restricts enumerator values to range of 'int'
(18446744073709551615 is too large) [-Wpedantic]
KMP_ALLOCATOR_MAX_HANDLE = UINTPTR_MAX
^ ~~~~~~~~~~~
/opt/local/include/libomp/omp.h:315:7: warning: ISO C restricts enumerator values to range of 'int'
(18446744073709551615 is too large) [-Wpedantic]
KMP_MEMSPACE_MAX_HANDLE = UINTPTR_MAX
^ ~~~~~~~~~~~
/opt/local/include/libomp/omp.h:343:39: warning: ISO C restricts enumerator values to range of 'int'
(18446744073709551615 is too large) [-Wpedantic]
typedef enum omp_event_handle_t { KMP_EVENT_MAX_HANDLE = UINTPTR_MAX } omp_event_handle_t;
^ ~~~~~~~~~~~
4 warnings generated.
basie:diffusion1d siegel$ more /opt/local/include/libomp/omp.h
/*
* include/omp.h.var
*/
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef __OMP_H
# define __OMP_H
# include <stdlib.h>
# include <stdint.h>
# define KMP_VERSION_MAJOR 5
# define KMP_VERSION_MINOR 0
# define KMP_VERSION_BUILD 20140926
# define KMP_BUILD_DATE "No_Timestamp"
More information about the Openmp-dev
mailing list