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
 Variadic Macros NOT recognized
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jeffrey Fong
Starting Member

1 Posts

Posted - Dec 07 2013 :  01:01:40 AM  Show Profile  Reply with Quote
C99 supports "Variadic Macros":
#define TEST(format, ...) func(format, __VA_ARGS__)

I encountered variadic macro syntax coloring problem with AssistX
Line 10: incomplete syntax coloring
Line 11: wrong mistyped symbols promption



Code for test:

#include <stdio.h>

#define DECLARE(ENTRY, ...) \	enum{ENTRY,__VA_ARGS__}; char *allDays = #ENTRY ## ", " ## #__VA_ARGS__;

int main(int argc, char* argv[]) {
	DECLARE(Sunday, Monday, Tuesday)
	printf_s("Out: Tuesday ranks %d in { %s }\\n", Tuesday, allDays);

	return 0;
}

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Dec 09 2013 :  5:55:23 PM  Show Profile  Reply with Quote
Which IDE and version of VA are you using?

The IDE underlines mistyped symbols in C++ code in VS2010 and above, while VA underlines them in VS2008 and below.

Testing your code in VS2012 with VA 2007 I am not seeing either problem, so I am wondering if I am using the wrong IDE or the wrong version of VA, or both.

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

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Dec 10 2013 :  4:10:09 PM  Show Profile  Reply with Quote
Oops, my mistake, the days of the weeks are defined in the Qt library, which is one of my stable include directories, which is why I was not seeing the problem at first. When I change the names of the enum items I am seeing the same problem here. Thank you for the clear bug report:

case=78893

zen is the art of being at one with the two'ness
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