[Openmp-dev] r239337 - Remove unused variables '__kmp_build_check_*'

Jack Howarth howarth.mailing.lists at gmail.com
Tue Jun 9 08:52:46 PDT 2015


Jonathan,
      Are you sure that the __kmp_build_check_* symbols generated from
the KMP_BUILD_ASSERT macros aren't dead code in openmp? I find that
the following patch eliminates the warnings....

warning: unused typedef '__kmp_build_check_492' [-Wunused-local-typedef]

when the toplevel llvm build is passed-DLLVM_ENABLE_ASSERTIONS=OFF but
they still remain for -DLLVM_ENABLE_ASSERTIONS=ON.
                 Jack


On Mon, Jun 8, 2015 at 7:54 PM, Jack Howarth
<howarth.mailing.lists at gmail.com> wrote:
> Jonathan,
>      The commit...
>
> http://lists.cs.uiuc.edu/pipermail/openmp-commits/2015-June/000339.html
>
> only converts the unused-variable warnings for __kmp_build_check_*
> into unused typedef warnings. My initial inclination was to test
> adding...
>
> #ifdef KMP_USE_ASSERT
> ...
> #endif
>
> preprocessor wrappers around all of the calls to the KMP_BUILD_ASSERT
> macro. However this doesn't work since the openmp build passes  -D
> KMP_USE_ASSERT to the compiler flags in the cmake build of openmp in
> the llvm tree. This occurs for a cmake build which pass passed
> -DLLVM_ENABLE_ASSERTIONS=OFF for the top-level cmake options.
> Shouldn't KMP_USE_ASSERT be disabled in that case or are those two
> usages of asserts unrelated?
>               Jack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KMP_USE_ASSERT.patch
Type: application/octet-stream
Size: 5301 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20150609/73f236e6/attachment.obj>


More information about the Openmp-dev mailing list