Re: Macro redefinition



Dave Hansen wrote:

<snip>

My question is simply, is the above C code allowed?

It's a pretty common idiom in the code I work with. One caveat: don't
forget to #undef EXPAND_DEF before redefining it.

Is really the #undef needed in this case? This is a function-like macro, and the re-definition had identical argument list.

--
Tor <torust [at] online [dot] no>
.



Relevant Pages