I’ve found some weird C++ preprocessor clauses, like:
#define COMPILER_FLOAT_ENTRIES_DO(template)
and
#define COMPILER_FLOAT_ENTRIES_DO(template) \
template(jvm_fadd) \
template(jvm_fsub) \
template(jvm_f2d)
What does passing “template” reserved word to a #define, and calling template(something) mean? I couldn’t find anything at Google; probably because “#define” and “template” are really common words.
The entire code is at https://phoneme.dev.java.net/source/browse/phoneme/components/cldc/trunk/src/vm/share/ROM/ROMWriter.hpp?rev=19839&view=markup.
so
COMPILER_FLOAT_ENTRIES_DO(x)gets replaced with with ”. In other words, it removes that macro from the code.so
COMPILER_FLOAT_ENTRIES_DO(x)gets replaced withx(jvm_fadd) x(jvm_fsub) x(jvm_f2d).If all else fails, you can see what is happening with macros by using
g++ -E -o foo.cppto leave the output of macro preprocessing infoo.cpp. Of course you’ll need all the other compilation flags passed in by command line as well (especially -D and -I flags).