From 7db47093c58d9c77a1cebd9d37e0959dfa60146a Mon Sep 17 00:00:00 2001 From: jmather-sesi <54645798+jmather-sesi@users.noreply.github.com> Date: Fri, 6 Feb 2026 13:04:02 -0500 Subject: [PATCH] Fix #if with no expression errors in platform.h When building in debug mode, gcc rasied multiple "#if with no expression" errors with OSL_DEBUG. Signed-off-by: jmather-sesi <54645798+jmather-sesi@users.noreply.github.com> --- src/include/OSL/platform.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/include/OSL/platform.h b/src/include/OSL/platform.h index 2b5e55385..3e83b71c0 100644 --- a/src/include/OSL/platform.h +++ b/src/include/OSL/platform.h @@ -299,7 +299,7 @@ #endif // OSL_DEBUG -#if OSL_DEBUG +#ifdef OSL_DEBUG // Disable OPENMP_SIMD when debugging #undef OSL_OPENMP_SIMD #endif @@ -326,7 +326,7 @@ // advisory. Put this attribute before the function return type, just like // you would use 'inline'. Note that if OSL_DEBUG is true, it just becomes // ordinary inline. -#if OSL_DEBUG +#ifdef OSL_DEBUG # define OSL_FORCEINLINE inline #elif defined(__CUDACC__) # define OSL_FORCEINLINE __inline__ @@ -363,7 +363,7 @@ // NOTE: only supported by Intel C++ compiler. // Unsupported compilers may instead use command line flags to increase their inlining // limits/thresholds -#if OSL_DEBUG +#ifdef OSL_DEBUG #define OSL_FORCEINLINE_BLOCK #else #define OSL_FORCEINLINE_BLOCK OSL_INTEL_PRAGMA(forceinline recursive)