public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Macro expansion without merging include files
@ 2004-10-01 12:25 lego
  2004-10-01 12:51 ` Claudio Bley
  2004-10-01 13:15 ` Sriharsha Vedurmudi
  0 siblings, 2 replies; 3+ messages in thread
From: lego @ 2004-10-01 12:25 UTC (permalink / raw)
  To: gcc-help

Is it possible to only expand macros in a c source file without invoking
the other preprocessor directives? I have studied the manual for the
preprocessor and the m4 macro expander without comming up with any
solution. Are there any other solutions for this problem perhaps?

Sincere,
Lego


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Macro expansion without merging include files
  2004-10-01 12:25 Macro expansion without merging include files lego
@ 2004-10-01 12:51 ` Claudio Bley
  2004-10-01 13:15 ` Sriharsha Vedurmudi
  1 sibling, 0 replies; 3+ messages in thread
From: Claudio Bley @ 2004-10-01 12:51 UTC (permalink / raw)
  To: gcc-help

On Fri, Oct 01, 2004 at 02:24:49PM +0200, lego@gentoo.se wrote:
> Is it possible to only expand macros in a c source file without invoking
> the other preprocessor directives? I have studied the manual for the
> preprocessor and the m4 macro expander without comming up with any
> solution. Are there any other solutions for this problem perhaps?

Why don't you just remove the unwanted include lines with a sed,
awk, perl or ... script and pipe it into the preprocessor?

-- 
Claudio

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Macro expansion without merging include files
  2004-10-01 12:25 Macro expansion without merging include files lego
  2004-10-01 12:51 ` Claudio Bley
@ 2004-10-01 13:15 ` Sriharsha Vedurmudi
  1 sibling, 0 replies; 3+ messages in thread
From: Sriharsha Vedurmudi @ 2004-10-01 13:15 UTC (permalink / raw)
  To: gcc

lego@gentoo.se wrote:

>Is it possible to only expand macros in a c source file without invoking
>the other preprocessor directives? I have studied the manual for the
>preprocessor and the m4 macro expander without comming up with any
>solution. Are there any other solutions for this problem perhaps?
>
>Sincere,
>Lego
>  
>
gcc -E <filename>

-E will ONLY preprocess. No compilation/assembling/linking will take place.

If you already know that and are looking for something else, im Sorry.

Cheers

-- 
 *****************************
 * Sriharsha Vedurmudi			
 * Software Engineer		
 * 
 * Redpine Signals Inc.	
 * Gate #395, Plot 87,88			
 * Sagar Society, Road #2, 
 * Banjara Hills,		
 * Hyderabad - 500 034			
 * www.redpinesignals.com	
 *							
 * +91-40-23559911  (Office)
 * +91-9849133133   (Mobile)
 *****************************

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-01 13:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-01 12:25 Macro expansion without merging include files lego
2004-10-01 12:51 ` Claudio Bley
2004-10-01 13:15 ` Sriharsha Vedurmudi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).