1

I'm building micropython which is meant to be compiled as C-code; my project team wants it compiled as C++ code so we don't have to mix C and C++ code.

Ok no big deal except parse.c contains

#define or(n) (RULE_ACT_OR | n)

And the C++ compiler says

error : "or" cannot be used as a macro name as it is an operator in C++

I definitely don't want to start messing with the micropython source.

QUESTION

Is there a C++ gcc compiler option to undefine one (or all) the alternative tokens?

Bob
  • 4,576
  • 7
  • 39
  • 107

0 Answers0