Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Variadic Macros NOT recognized

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
Jeffrey Fong Posted - Dec 07 2013 : 01:01:40 AM
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;
}

2   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Dec 10 2013 : 4:10:09 PM
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
feline Posted - Dec 09 2013 : 5:55:23 PM
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.

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