XLC cpp

XLC cpp

Post by Marc Kwiatkowski {Host Software-AI » Thu, 16 May 1991 11:43:25



Is it my imagination, or is it really impossible to get the XLC
C preprocessor to allow macros with variable parameter lists?

The following produces warnings but processes correctly for SunOS 4.1,
and no warnings for AIX/1.2.1 but fails for AIXv3.1

#define DEBUG(x)        printf x

I've tried the four flavors of cpp supported by -qlanglvl flag.
Same result.  Interestingly the cpp,
/usr/lpp/X11/Xamples/util/cpp/cpp,  provided with X works.
Do I really have to use the X11 cpp to make reasonable
debug macros?  

--
        ------------------------------------------------------------------
        Marc P. Kwiatkowski                     Ultra Network Technologies

        uucp: ...!ames!ultra!marc               San Jose, CA 95134 USA
        telephone: 408 922 0100 x249

        Ignore the following signature.
--
        ------------------------------------------------------------------
        Marc P. Kwiatkowski                     Ultra Network Technologies

        uucp: ...!ames!ultra!marc               San Jose, CA 95134 USA

 
 
 

XLC cpp

Post by Carl Lew » Thu, 16 May 1991 14:48:41



>Is it my imagination, or is it really impossible to get the XLC
>C preprocessor to allow macros with variable parameter lists?
>The following produces warnings but processes correctly for SunOS 4.1,
>and no warnings for AIX/1.2.1 but fails for AIXv3.1
>#define DEBUG(x)        printf x
>I've tried the four flavors of cpp supported by -qlanglvl flag.
>Same result.  Interestingly the cpp,
>/usr/lpp/X11/Xamples/util/cpp/cpp,  provided with X works.
>Do I really have to use the X11 cpp to make reasonable
>debug macros?  
>--
>    ------------------------------------------------------------------
>    Marc P. Kwiatkowski                     Ultra Network Technologies

>    uucp: ...!ames!ultra!marc               San Jose, CA 95134 USA
>    telephone: 408 922 0100 x249
>    Ignore the following signature.
>--
>    ------------------------------------------------------------------
>    Marc P. Kwiatkowski                     Ultra Network Technologies

>    uucp: ...!ames!ultra!marc               San Jose, CA 95134 USA

For compiling any serious works the AIX cpp is STUFFED.  Use the cpp
that comes with gcc (minor stuffing about with flags needed ). Or
grab the BSD4.3 cpp and apply the pathches from one of the comp.*
archives which gives it the ability to handle #elif

Just my two bits worth

    Carl : Programmer (etc) with University of Tasmania


--
    Carl : Programmer (etc) with University of Tasmania



 
 
 

1. xlc with another cpp than the builtin version ...

I have found some anoying bugs in the ibm's xlc cpp it cannot
compile this:

#include <stdio.h>
#define m1(s) printf(s)
#define m2(a) m1(#a)
f() { m2(!"This should not break"); }

Does anybody knows if there is any compiler options that or config
parameters that would allow me to plug in my own version of cpp ?

Thanks,
Minh Tran-Le.

2. FIND and PRUNE

3. cpp gone in 4.0 (Was: cpp vs. m4 for .s files)

4. Which Linux CD?

5. ren r*.CPP r*.cpp

6. Sound Drivers.... help !!!

7. diff. between /usr/vac/bin/xlc & /usr/bin/xlc

8. suse evaluation version

9. Upgrading xlc.rte and xlc.aix43.rte

10. Difference between xlc and xlC on AIX

11. Problem : To link a .cpp main file with a C object(.o) and C++ object(.o) using xlc compiler

12. cpp: Out of file descriptors?!

13. KDE2.2: kprocess.cpp does not compile on Solaris7