Hello all,

It has just been pointed out to me that in my product that makes liberal use
of macros the macros confuse the CodeWarrior feature that displays the
function names that are in an editor window when you press the "Functions"
button. I have been able to isolate the problem to curly braces inside
macros. Here's a small example:

#define LCURLY {

void Foo(void)
LCURLY
    UInt16 x[] = LCURLY 10, 20 };
}

void Bar(void)
{
}

When the above code is in a CW editor window the second function "Bar" does
not display in the functions list. It looks to me like the parser gets
confused because of the curly braces in the macros and stops scanning the
file. The really strange part is that if you replace one (it doesn't seem to
matter which one) of the references to LCURLY with an actual '{' the problem
is fixed. Also, if I place the snippet //{} after the closing brace of
function Foo that also seems to solve the problem.

Is this a known problem and is there a better workaround than appending the
//{} snippet to functions where the problem appears? I have only tested this
with R6 so if this has already been fixed in a newer release please let me
know that too.

Thanks,

Mark Ginsberg
DependTech,LLC






-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to