The following code revealed some small bugs in the
assembler.
void getFieldText_local([...]);
int na_local(int n);
char *aa_local(char* s);
//...
void foo()
{
getFieldText = getFieldText_local;
na = na_local;
sa=sa_local; //sa has been defined elsewhere as a
global function pointer variable
}
This compiles without a hitch, but when it assembles it
says "Undefined global data label na_lo". There are two
things wrong with this:
1) na_local is defined. It's off by one line (yes, I
did tests, it gives the line before the correct line)
2) it restricts the length of the label it's showing to
only 5 characters. It should be able to support any
number of characters dynamically.
Logged In: YES
user_id=874495
This problem happens with global variables, as well as
functions.
extern int X; //but I neglected to actaully instantiate this...
void foo() {}
void bar() { int Y = X; foo(); }
I get "Undefined global data label foo_00". It took me a full
day of swearing "IT'S RIGHT F****N THERE!" before I figured
it out.
What's even worse is if you have this:
extern int X; //still not instantiated
void bar() { int Y=X; }
and nothing else in the file, you get "Undefined global data
label $X%@*2$#" or something like that.
I looked at the OnBoard.c code which is generating this
error. It's horribly obscure, though I might try diving into it at
somepoint.
Logged In: YES
user_id=583634
I know what causes this bug, and will check in a fix in the
next day or so. Very annoying.