Source processor bug
-
I think the Source processor is buggy. It's checking code that is commented out with #if 0 blocks, which should be ignored.
1> Source processor:
1>test.cpp(463,89): error : No matching closing parenthesis found for {
1>test.cpp(504,25): error : Mismatching closing parenthesis )Source code:
#if 0
printf"test"); // missing first parenthesis
#endif -
Ah, I've had a similar problem. Thankfully, it turned out to be easily fixable:
The source processor does not follow #if statements. All code is parsed, regardless of wether it would actually be compiled or not. Therefore the following code:
#if API_VERSION >= 20000 if (result->_descId[0].id == SOMETHING) { #else if (result->id[0].id == SOMETHING) { #endif DoSomething(); }
would look like this for the source processor:
if (result->_descId[0].id == SOMETHING) { if (result->id[0].id == SOMETHING) { DoSomething(); }
Change it to something like this:
#if API_VERSION >= 20000 if (result->_descId[0].id == SOMETHING) #else if (result->id[0].id == SOMETHING) #endif { DoSomething(); }
Hope it helps.
-
Hi,
actually this is not a bug, but a design decision. Here at MAXON we have a pretty large code base and especially disabled code branches tend to age a lot faster. So we try to force developers to also maintain such code pieces or to at least think about, if they are still valuable and otherwise remove and thus cleanup the code base.
Cheers,
Andreas