Fix "#if with no expression" errors in platform.h#2071
Fix "#if with no expression" errors in platform.h#2071jmather-sesi wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Conversation
When building in debug mode, gcc rasied multiple "#if with no expression" errors with OSL_DEBUG. Signed-off-by: jmather-sesi <[email protected]>
|
|
I'm not sure why this is needed. The first mention of OSL_DEBUG in platform.h is at line 289: That sure looks like it will always result in OSL_DEBUG being defined. Additionally, in light of this, it's clear that "#ifdef OSL_DEBUG" is the wrong test, since sometimes it is defined and 0. I feel like something else must be going on. What about that suspicious clause of |
|
@jmather-sesi Any thoughts on my question? |
|
Hi, @jmather-sesi, checking in again. Please read my earlier comments, I would like your thoughts. |
|
@jmather-sesi Checking in again. Can you explain more what's going on here? |
|
Hi @lgritz, apologies for my tardiness. I'm not entirely sure how this issue occurred at the time, as I'm unable to reproduce it. I'll re-open if I run into it again. Thanks! |
Description
When building in debug mode, gcc rasied multiple "#if with no expression" errors with OSL_DEBUG.
Tests
Not applicable. Code compiles.
Checklist:
already run clang-format v17 before submitting, I definitely will look at
the CI test that runs clang-format and fix anything that it highlights as
being nonconforming.