run c precompiler alone

R

rembremading

Hi all!

maybe somebody here knows whether there exists a way to view the source code
after it ran through the precompiler.
Or, if this is unreadable if there
I have a code with many precompiler commands in it and I would like to see
the code after such statements like
#ifdef SOMETHING
....
#endif
if SOMETHING has not been defined, have been removed.
I am using gcc.

Thanks,

Andreas
 
R

Remo D.

rembremading ha scritto:
maybe somebody here knows whether there exists a way to view the source code
after it ran through the precompiler.

It depends on the compiler you're using. Try cpp.

Remo.D
 
D

Daniel Kraft

rembremading said:
Hi all!

maybe somebody here knows whether there exists a way to view the source code
after it ran through the precompiler.
Or, if this is unreadable if there
I have a code with many precompiler commands in it and I would like to see
the code after such statements like
#ifdef SOMETHING
...
#endif
if SOMETHING has not been defined, have been removed.
I am using gcc.

Depends on your compiler (i.e., gcc), so off-topic here. However, I
think gcc -E does the job.

Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top