c - Astyle with --remove-brackets and a macro -
c - Astyle with --remove-brackets and a macro -
with code:
#define macro(a,b) foo(a); bar(b) if(true) { macro(a,b); } astyle remove brackets around macro call
if(true) macro(a,b); fortunately found solution. if place ; within macro, astyle understand it.
#define macro(a,b) foo(a); bar(b); if(true) { macro(a,b) } is solution, bug astyle or misunderstanding?
it's bad style.
if absolutely must have multiple statements in macro, wrap them in do while loop (note lack of semicolon @ end):
#define macro(a,b) { foo(a); bar(b); } while(0) c astyle
Comments
Post a Comment