c-syntactic-indentation-in-macros

c-syntactic-indentation-in-macros is a variable defined in `cc-vars.el'.
Its value is
t

  • This variable is safe as a file local variable if its value
    satisfies the predicate `booleanp'.

Documentation:
*Enable syntactic analysis inside macros.
If this is nil, all lines inside macro definitions are analyzed as
`cpp-macro-cont'. Otherwise they are analyzed syntactically, just
like normal code, and `cpp-define-intro' is used to create the
additional indentation of the bodies of "#define" macros.

Having this enabled simplifies editing of large multiline macros, but
it might complicate editing if CC Mode doesn't recognize the context
of the macro content. The default context inside the macro is the
same as the top level, so if it contains "bare" statements they
might be indented wrongly, although there are special cases that
handle this in most cases. If this problem occurs, it's usually
countered easily by surrounding the statements by a block (or even
better with the "do { ... } while (0)" trick).

You can customize this variable.