run c precompiler alone

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rembremading

    run c precompiler alone

    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
  • Remo D.

    #2
    Re: run c precompiler alone

    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

    Comment

    • Daniel Kraft

      #3
      Re: run c precompiler alone

      rembremading wrote:
      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

      --
      Done: Bar-Sam-Val-Wiz, Dwa-Elf-Hum-Orc, Cha-Law, Fem-Mal
      Underway: Ran-Gno-Neu-Fem
      To go: Arc-Cav-Hea-Kni-Mon-Pri-Rog-Tou

      Comment

      • rembremading

        #4
        Re: run c precompiler alone

        Thanks, that's what I searched for. Sorry for being off-topic.

        Daniel Kraft wrote:
        rembremading wrote:
        >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
        >

        Comment

        Working...