Message-Id: <3.0.16.19971017112226.2b475a64@hem1.passagen.se> Date: Fri, 17 Oct 1997 11:23:19 -0400 To: fighteer AT cs DOT com From: Peter Palotas Subject: Re: CPP question. Cc: djgpp AT delorie DOT com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Precedence: bulk At 18.05 1997-10-16 +0000, you wrote: >Peter Palotas wrote: >> >> Well, no, this was not the problem. The problem was (as it showed a little >> later) that all I wanted was for CPP to process the #include "file.h" >> statements, and leave all the others. Now I created two AWK programs which >> solved this problem. But thanks anyway! > >Oh, I see. Well, gcc does have an option to stop compilation after the >preprocessor stage. It then outputs the preprocessed code to stdout, so >you can capture it and place it in a file. The switch is -E, I >believe. You could use this to write a tiny program that does nothing >but include the header file, and then view the results. Thanx, I was wondering if there was such a switch too, but it really was not my problem. (You can write "cpp test.c > test.i" too, although you don't get the definitions that GCC normally provides (DJGPP, __MSDOS__ and so on). My PROBLEM was that in the below file, if we add a line #include I did NOT want that line to be preprocessed. *only* #include "" statements should be preprocessed, and all #defines and such left alone. >----- test.c ----- > >#include "file.h" > >------------------ > >gcc -E test.c > test.i -- Peter Palotas alias Blizzar -- blizzar AT hem1 DOT passagen DOT se -- ***************************************************** * A brief description of DJGPP: * * NEVER BEFORE HAS SO FEW DONE SO MUCH FOR SO MANY! * *****************************************************