www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - Emit Pragma

↑ ↓ ← 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
↑ ↓ → "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