[Openmp-dev] embedding a directive within macro arguments has undefined behavior

Jack Howarth howarth.mailing.lists at gmail.com
Tue Jun 2 18:45:26 PDT 2015


Jonathan,
      I also noticed we have the warnings...

/sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_tasking.c:1061:2:
warning: embedding a directive within macro arguments has undefined
behavior [-Wembedded-directive]
#if OMP_41_ENABLED
 ^
/sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_tasking.c:1063:2:
warning: embedding a directive within macro arguments has undefined
behavior [-Wembedded-directive]
#else
 ^

Shouldn't the macro call to KA_TRACE be duplicated and the
preprocessor directives be moved outside of the macro call argument
list instead?
               Jack



More information about the Openmp-dev mailing list