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
 Advanced Syntax Highlighting ALWAYS See Macro
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

[email protected]
New Member

USA
7 Posts

Posted - Oct 06 2015 :  4:38:44 PM  Show Profile  Reply with Quote
There's a bug in VAX Enhanced Syntax Coloring for C++.

In the standard Windows (driver development) include file WDM.H, there is a declaration for the function ExAllocatePoolWithTag. The function's definition is not provided (as it's part of the Windows OS).

A few lines after the declaration, in the same include file, there's a conditional re-definition of this function:

#ifndef POOL_TAGGING
#define ExAllocatePoolWithTag(a,b,c) ExAllocatePool(a,b)
#endif //POOL_TAGGING

POOL_TAGGING is always defined in this same file, prior to the conditional redefinition above, like so:

#define POOL_TAGGING 1

And, indeed, the #define above is greyed-out, indicating that VAX knows that POOL_TAGGING is defined.

Despite this... The function ExAllocatePoolWithTag is always highlighted in the color for "Preprocessor macros."

I can "correct" the syntax highlighting by commenting out the #define above.

I know it's a small thing, but it's REALLY distracting, because this is a routine that's very commonly called (it's basically the kernel-mode equivalent of malloc in C).

Thanks for adding this to your "prioritized list of things to do"...

Peter

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 07 2015 :  03:41:12 AM  Show Profile  Reply with Quote
The greying-out is done by Visual Studio, not us. We parse every ifdef/ifndef branches, not just the active ones. This is so features like completion listboxes, add include, rename, etc. works in and from inactive blocks. For example, if you've set a RELEASE Solution Configuration you can work on DEBUG branches without the need to switch between the two in Visual Studio.

Sorry for the inconvenience this is causing for you.
Go to Top of Page

[email protected]
New Member

USA
7 Posts

Posted - Oct 07 2015 :  10:41:25 AM  Show Profile  Reply with Quote
Thank you for taking the time to read and consider the issue.

>The greying-out is done by Visual Studio, not us.

But it's not the greying-out that's the bug. Given that in some cases ExAllocatePoolWithTag is a function (that's when POOL_TAGGING is defined) and in other cases it's a pre-processor define (that's when POOL_TAGGING is not defined).

The BUG is that Enhanced Syntax Coloring *always* colors ExAllocatePoolWithTag as a "Preprocessor macro". Even when it's NOT (because POOL_TAGGING is defined).

So... because in SOME cases the function is #defined'ed VAX *always* colors it as a #define.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 08 2015 :  7:22:42 PM  Show Profile  Reply with Quote
I understand your problem. We're considering to parse preprocessor branches differently at some point:

case=42316

Sorry for the inconvenience.
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