Get all prefedined preprocessor macro

How to get the equivalent of “gcc -dM -E”, in order to get all the predefined cpp macros with pgi compilers?

Hi boolegue,

‘dM -E’ will give you all predefined macros as well as macros from header files. Granted it’s a bit more information than gcc gives, but hopefully this will work for you.

% pgcc -help -dM -E
-dM (C only) Print macros and values, including predefined and command-line macros
-E Stop after preprocessor; print output on standard output

  • Mat

I was actually trying this with pgCC, I should have mentioned g++ instead of gcc, sorry about that.

Why is it not working for pgcc and not pgCC !?

Why is it not working for pgcc and not pgCC !?

It’s a feature of pgcc only. We license the pgCC front-end, which does the preprocessing, from another company that does not include this feature.

Sorry,
Mat