generator: C generator supports C++ and improved macros