问题
can you guys tell me, what does this mean in C?
#define Privileged_Data
Privileged_Data static int dVariable
Is it specific meaningful for Compiler to address variable?
回答1:
This is just a macro Privileged_Data
doing nothing. The compiler will not even see it after the preprocessor pass.
It's probably a readability or company standards decision to tag some variables like this.
回答2:
A preprocessor macro can be defined without an associated value. When that is the case, the macro is substituted with nothing after preprocessing.
So given this:
#define Privileged_Data
Then this:
Privileged_Data static int dVariable
Becomes this after preprocessing:
static int dVariable
So this particular macro has no effect on the program, and was probably put in place for documentation purposes.
来源:https://stackoverflow.com/questions/53520289/what-does-this-mean-by-variable-define-in-c