Help with CPP woes

MY NAME gt3852a at prism.gatech.EDU
Fri May 3 23:49:16 AEST 1991


In article <carl.671430432 at probitas> carl at 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 at sybil.gatech.edu
----------------------------------------------------------------


-- 
NASR BELKEIR
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp:     ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!gt3852a
Internet: gt3852a at prism.gatech.edu



More information about the Comp.unix.aix mailing list