Menu

#2 compilation fails for multi line macros

closed
nobody
None
5
2004-02-25
2002-12-27
Anonymous
No

this type of macro fails to compile

#define TESTEXEC(bool, prog) \
if (bool) { \
prog; \
}

TESTEXEC(TRUE, {call aFunction()});
if i run the CPP alone it insertes the macro correctly
so the problem is with the ncc pre-porcessor.

ndbusek@cs.ucla.edu

LECS lab

Discussion

  • David Gay

    David Gay - 2004-02-25

    Logged In: YES
    user_id=398311

    Well there's a syntax error (no ; before }). With that
    added, it compiles.

     
  • David Gay

    David Gay - 2004-02-25
    • status: open --> closed