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

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -