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

Peyton, Jonathan L jonathan.l.peyton at intel.com
Wed Jun 3 11:28:32 PDT 2015


Fixed.
Committed revision 238950.

-- Johnny

-----Original Message-----
From: Jack Howarth [mailto:howarth.mailing.lists at gmail.com] 
Sent: Tuesday, June 2, 2015 8:45 PM
To: Peyton, Jonathan L; openmp-dev at dcs-maillist2.engr.illinois.edu
Subject: embedding a directive within macro arguments has undefined behavior

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