[comp.unix.shell] cpp

sujm@pug.ece.cmu.edu (Sujoy Mitra) (05/30/91)

Is there a simple way to prevent the C-Preprocessor,
/usr/lib/cpp from applying macro definitions recursively?
According to the manual entry, the -R switch, 'permits recursion 
when a macro is expanded', but recursion seems to be the default!

Consider something simple like:

{
#define POWER POWER - power

POWER
}

This results in
{
power - power - power ... 

until some internal limit is exceeded.

I am using '/usr/lib/cpp' to pre-process a data file.
Path: sujm
Newsgroups: 
Distribution: cmu
Followup-To: 
From: sujm@pug.ECE.CMU.EDU (Sujoy Mitra)
Reply-To: sujm@pug.ECE.CMU.EDU (Sujoy Mitra)
Organization: Electrical and Computer Engineering, Carnegie Mellon
Subject: 
Keywords: