www.digitalmars.com         C & C++   DMDScript  

c++ - Emit Pragma

reply Mark Evans <mevans zyvex.com> writes:
A very nice pragma supported by some compilers is

#pragma emit(...)

It just emits to stdout at compile time whatever preprocessor argument is used.
The utility is that it helps to debug preprocessor macros.  The argument is
fully evaluated by the preprocessor before it is emitted.

Please drop this one into the DM suggestion box.

Mark
Jul 12 2001
parent "Walter" <walter digitalmars.com> writes:
Ok, but be aware that the switch combination
    -e -l
is a great one to debug preprocessor output. I use it all the time when I
work with code that includes an impossible morass of preprocessor commands.
What it does is sent the fully preprocessed output to file.lst, where file.c
is your source file.


Mark Evans wrote in message <1103_994968906 evans>...
A very nice pragma supported by some compilers is

#pragma emit(...)

It just emits to stdout at compile time whatever preprocessor argument is

The utility is that it helps to debug preprocessor macros.  The argument is
fully evaluated by the preprocessor before it is emitted.

Please drop this one into the DM suggestion box.

Mark

Jul 12 2001