Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 10.5.1738 C++ parsing error
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

hajokirchhoff
Ketchup Master

Germany
58 Posts

Posted - Oct 21 2009 :  06:49:37 AM  Show Profile  Reply with Quote
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

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 23 2009 :  08:27:11 AM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description:

case=34406
Go to Top of Page

hajokirchhoff
Ketchup Master

Germany
58 Posts

Posted - Oct 23 2009 :  09:33:12 AM  Show Profile  Reply with Quote
quote:
Originally posted by accord

I am seeing the same effect here. Thank you for the clear description:

case=34406


Thanks for the fast reply and positive feedback. This motivates me to post more bugs. There are still many places where VAssistX does not work as I would expect it to do, but I am still very satisfied with it anyway.

I am using the boost libraries a lot and I can imagine how challenging they are to parse.

Regards and thanks

Hajo
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Mar 17 2011 :  11:40:08 PM  Show Profile  Reply with Quote
case=34406 has been marked as a duplicate of case=3548, which is fixed in build 1845

Whole Tomato Software, Inc.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000