Hi there, I just bought another year of VAssistX and 1738 is even better than 1715 :-) Many thanks.
There is a bug in the C++ parser: consider this snippet
float receiver_bandwidth;
if (the_mode==mode_channel_occupancy) {
static struct {
float receiver_bandwidth;
size_t averaging;
} job_params;
// Find By Reference 'receiver_bandwidth' confused here
receiver_bandwidth=job_params[i].receiver_bandwidth*1e6;
} else {
// Find By Reference 'receiver_bandwidth' works okay
receiver_bandwidth=10;
}
The assignment before the 'else' contains two different 'receiver_bandwidth' variables. VA confuses them.
Set the caret to the LValue (receiver_bandwidth) of the assignment, the one from the outer scope. Find Previous by Context should find the outer scope. Instead it finds the variable in the static unnamed struct job_params.
Set the caret to the LValue in the 'else' branch (receiver_bandwidth=10). Find Previous By Context works okay and finds the outer scope.
Problem:
static struct {
float member;
} v;
VA apparently sees 'member' as a declaration of a variable in the current scope, which it is not.
Regards