const
DIAGNOSTIC_REASON_INVALID_FLAGS = $7ffffff8; // <=> not $80000007
I mean, if you accept Nitorami's solution you can as well directly resolve as above ...
Just as general information...
That definition comes from one of the .c header files (winnt.h) and after unsuccessfully trying a number of ways using typecasts to get rid of the compiler warning, I figured I'd use the result of "not" just as you suggested above.
The problem I have with that one is that it is not "parallel" to the original definition and it is not visually obvious that not $80000007 is $7ffffff8 and a visual comparison of the original has 0x80000007 while the ported definition has a number that is visually totally different ($7ffffff8). That bothered me.
Nitorami's solution is my preferred one because when visually comparing (~0x80000007) with $80000007 xor $FFFFFFFF there are two ops, a "not" in one and an "xor" in the other, that makes the operator count "parallel" (the same) and, it should be reasonably easy for a programmer to quickly figure out that the "xor $FFFFFFFF" is equivalent to the "not" in this case and the original value is there to be visually matched.
For that reason, I prefer Nitorami's solution over simply using the result of the "not" operation.