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

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


Jonathan,
     I should have also noted that with KMP_USE_ASSERT.patch applied,
the build with -DLLVM_ENABLE_ASSERTIONS=OFF produces no regressions in
the OpenMP3.1_Validation test suite at -m32/-m64 on
x86_64-apple-darwin14.
           Jack

On Tue, Jun 9, 2015 at 11:52 AM, Jack Howarth
<howarth.mailing.lists at gmail.com> wrote:
> 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



More information about the Openmp-dev mailing list