Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 10.5.1738 C++ parsing error

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
hajokirchhoff Posted - Oct 21 2009 : 06:49:37 AM
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
3   L A T E S T    R E P L I E S    (Newest First)
support Posted - Mar 17 2011 : 11:40:08 PM
case=34406 has been marked as a duplicate of case=3548, which is fixed in build 1845
hajokirchhoff Posted - Oct 23 2009 : 09:33:12 AM
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
accord Posted - Oct 23 2009 : 08:27:11 AM
I am seeing the same effect here. Thank you for the clear description:

case=34406

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000