Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!rex!uflorida!mailer.cc.fsu.edu!prism!gt3852a From: gt3852a@prism.gatech.EDU (MY NAME) Newsgroups: comp.unix.aix Subject: Re: Help with CPP woes Message-ID: <27985@hydra.gatech.EDU> Date: 3 May 91 13:49:16 GMT Organization: Georgia Institute of Technology Lines: 46 In article carl@probitas.cs.utas.edu.au (Carl Lewis) writes: > >AIX's poor old cpp gives up the ghost about three macro levels down. >Unfortuantely I cannot repeat the bug with a simple test case. >xlc, bsdcc , cc all fail at various stages with both the inbuilt >and external cpp (/lib/). I've even tried /usr/lpp/X11/Xamples/util/cpp ! >, further than that I've tried porting BSD4.3 cpp which doesn't >work either. (it doesn't understand #elif :-( ). > >Does anyone have a solution in the way of flags or non brain dead cpp >source ? > >Thanks >Carl, Programmer (etc) with University of Tasmania > Carl, AIX does not support more than 16 nested #include and 32 nested #infdef. This may sound reasonable for a human programmer. It's very hard to imagine an average human mind going for that many levels of nested operations. Unfortunately, some of the programs are created by generators, that's the case of object-oriented programs with inheritance. In such programs, it's easy to end up generating programs with VERY deep nested levels. The way to solve this problem is to modify your CPP. To do that you need to get the source for a CPP (I suggest the one that comes with MOTIF 1.1) and change the constants of NESTED_IFDEF and NESTED_INCLUDE to a large value (I suggest 64). Then remake CPP and use the new copy of CPP to preprocess your programs. Hope this helps -Nasr Belkeir, Georgia Institute of Technology ---------------------------------------------------------------- Nasr E. Belkeir, belk@sybil.gatech.edu ---------------------------------------------------------------- -- NASR BELKEIR Georgia Institute of Technology, Atlanta Georgia, 30332 uucp: ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!gt3852a Internet: gt3852a@prism.gatech.edu