Jump to content

Parser bug in #if exppression


photo

Recommended Posts

Hi all,

I think I have found a bug related to preprocessor's behavior with #if expressions.

In the attached sample, when a variable is defined in a conditional expression, the later expressions ignore it despite of the variable is properly defined.

if_preprocessor.zip

Link to comment

Hi Iván,
 
Yes, you are absolutely right :) Temporary workaround for this issue is to replace code starting from line 12 to this:

#ifdef USE_TEST_VARIABLE_1
 #define TEST_VARIABLE 1
#endif // USE_TEST_VARIABLE_1
 
#ifdef USE_TEST_VARIABLE_2
 #define TEST_VARIABLE 2
#endif // USE_TEST_VARIABLE_2
 
#ifdef USE_TEST_VARIABLE_3
 #define TEST_VARIABLE 3
#endif // USE_TEST_VARIABLE_3

This issue will be fixed in the next SDK update.
 
Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
This topic is now closed to further replies.
×
×
  • Create New...