[Openmp-commits] [openmp] r239337 - Remove unused variables '__kmp_build_check_*'
Jonathan Peyton
jonathan.l.peyton at intel.com
Mon Jun 8 13:18:11 PDT 2015
Author: jlpeyton
Date: Mon Jun 8 15:18:10 2015
New Revision: 239337
URL: http://llvm.org/viewvc/llvm-project?rev=239337&view=rev
Log:
Remove unused variables '__kmp_build_check_*'
As an ongoing effort to sanitize the openmp code, this one word change
eliminates creating 1 byte arrays named __kmp_build_check_* and instead
creates one byte array types. The KMP_BUILD_ASSERT macro still offers the same
functionality; array types with negative number of elements is illegal
and will cause a compiler failure.
Modified:
openmp/trunk/runtime/src/kmp_debug.h
Modified: openmp/trunk/runtime/src/kmp_debug.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_debug.h?rev=239337&r1=239336&r2=239337&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_debug.h (original)
+++ openmp/trunk/runtime/src/kmp_debug.h Mon Jun 8 15:18:10 2015
@@ -40,7 +40,7 @@
Do not use _KMP_BUILD_ASSERT and __KMP_BUILD_ASSERT directly, it is working guts.
*/
-#define __KMP_BUILD_ASSERT( expr, suffix ) static char __kmp_build_check_##suffix[ (expr) ? 1 : -1 ]
+#define __KMP_BUILD_ASSERT( expr, suffix ) typedef char __kmp_build_check_##suffix[ (expr) ? 1 : -1 ]
#define _KMP_BUILD_ASSERT( expr, suffix ) __KMP_BUILD_ASSERT( (expr), suffix )
#define KMP_BUILD_ASSERT( expr ) _KMP_BUILD_ASSERT( (expr), __LINE__ )
More information about the Openmp-commits
mailing list