Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Advanced Syntax Highlighting ALWAYS See Macro

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
[email protected] Posted - Oct 06 2015 : 4:38:44 PM
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
3   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Oct 08 2015 : 7:22:42 PM
I understand your problem. We're considering to parse preprocessor branches differently at some point:

case=42316

Sorry for the inconvenience.
[email protected] Posted - Oct 07 2015 : 10:41:25 AM
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.
accord Posted - Oct 07 2015 : 03:41:12 AM
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.

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