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
 typedef struct not recognized with inheritance
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

catod6
New Member

6 Posts

Posted - Aug 29 2006 :  04:51:10 AM  Show Profile  Reply with Quote
There is a problem with the latest version (I checked both b1446 and 1533) with typedefs.
I want to say, that this feature worked correctly in a previous version I had (b1298).

In the following example, MyClass2 is not recognized by VA-X:

class MyClass1
{
MyClass1()
{
}
};

typedef struct _MyClass2 : public MyClass1
{
_MyClass2()
{

}
} MyClass2;

If I remove the inheritance code, (i.e., ": public MyClass1") then it's ok.


I saw a reference to a similar issue here:
http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=5072
But since a lot of my code is already written like that, I cannot change it.

.oisyn
Tomato Guru

162 Posts

Posted - Aug 29 2006 :  09:17:31 AM  Show Profile  Reply with Quote
Regarding the answer from the moderator in that other thread, I'd like to request that VA X is able to handle all legal ISO C++ constructs, not only the ones that someone thinks that should be used or is better in his opinion.
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Aug 29 2006 :  11:54:07 PM  Show Profile  Reply with Quote
I agree. But, why clutter this topic with a response to that topic?

[edit]
Wait. I have re-thought this. And, I have re-read the referenced topic, and understand why the message is here. Sorry about that.

Please note that the following is my personal opinion. I am not a decision-maker for WT, although I do work for them responding to questions on the forums.

I agree that not handling any legal ISO C++ construct is a bug. Taking it a step further, even if the construct or syntax is an extension to the language, if VS supports it, VA not supporting it is a bug since VA is an extension to VS. But, whether or not that bug is fixed is dependent upon the cost to fix the bug versus the number of people that will benefit from that fix.

In the referenced topic, the poster did not respond, so I assume that it was not important enough for that poster to have the bug fixed.

End of personal opinion

I will try to reproduce this in my environment. If I can reproduce it, I will enter a case. Unfortunately, I do not have time to do that at this moment. Please give me some time (on the order of 12-18 hours) to get back to it.
[/edit]

Joe Pizzi

Edited by - jpizzi on Aug 31 2006 12:25:25 AM
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Aug 31 2006 :  12:39:52 AM  Show Profile  Reply with Quote
As you probably expected, easy to reproduce.

case=2302

Joe Pizzi
Go to Top of Page

catod6
New Member

6 Posts

Posted - Aug 31 2006 :  07:49:38 AM  Show Profile  Reply with Quote
So will it be fixed for the next build?
Where can I see the open cases and be updated for changes in their status?
Go to Top of Page

rhummer
Tomato Guru

USA
527 Posts

Posted - Aug 31 2006 :  09:28:05 AM  Show Profile  Reply with Quote
It hasn't been marked for when it will be fixed since it went in a few hours ago.

Cases are for our internal bug tracking, so you can't see open cases. If you want to be updated you have to bug us :)

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64

Go to Top of Page

catod6
New Member

6 Posts

Posted - Dec 04 2006 :  09:48:23 AM  Show Profile  Reply with Quote
Is there any news regarding that?
It is the only thing that stops me from upgrading...
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Dec 04 2006 :  2:48:17 PM  Show Profile  Reply with Quote
Unfortunately no progress on this so far.

Is there some reason why you are deriving a structure from a class? I am aware that in C++ a class and a structure are virtually identical, so this is legal, but it seems an odd choice, and I would have thought it would confuse people.

zen is the art of being at one with the two'ness
Go to Top of Page

catod6
New Member

6 Posts

Posted - Feb 22 2007 :  11:26:48 AM  Show Profile  Reply with Quote
Any news regarding this case? I'm still waiting for a fix in order to upgrade.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Feb 22 2007 :  1:46:39 PM  Show Profile  Reply with Quote
Unfortunately no progress on this yet. However I believe I have a work around fix for you. I have changed the code to read:

#define FELINE_STRUCT typedef struct

FELINE_STRUCT _MyClass2 : public MyClass1
{
public:
	_MyClass2()
	{

	}
} MyClass2;


to the compiler this is exactly the same thing, but it allows me to redefine FELINE_STRUCT so that VA see's something else.

Edit the file:

"C:\\Program Files\\Visual Assist X\\Misc\\StdAfx.h"

and add the entry:

#define FELINE_STRUCT class

at the bottom. This file is used to help VA's parser with difficult code, and can be used to work around odd effects. There are a couple of things to watch out for though. After modifying this file you need to rebuild the VA symbol database for the changes to take effect:

VA Options -> Performance -> General -> Rebuild symbol databases

Secondly when you install a new build of VA it will install the latest version of VA's StdAfx.h file, which will overwrite your changes. So long as you reapply your changes before loading the IDE then the rebuild that the installer triggers will also pick up your changes.

Hopefully this will help, and will allow you to run the current builds. I have only run a few tests on this, but so far it seems to fix the problems.

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jan 27 2009 :  9:22:48 PM  Show Profile  Reply with Quote
case=2302 is fixed in build 1715

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