marc@mercutio.ultra.com (Marc Kwiatkowski {Host Software-AIX}) (05/15/91)
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 Internet: marc@ultra.com 101 Daggett Drive uucp: ...!ames!ultra!marc San Jose, CA 95134 USA telephone: 408 922 0100 x249 Ignore the following signature. -- ------------------------------------------------------------------ Marc P. Kwiatkowski Ultra Network Technologies Internet: marc@ultra.com 101 Daggett Drive uucp: ...!ames!ultra!marc San Jose, CA 95134 USA
carl@probitas.cs.utas.edu.au (Carl Lewis) (05/15/91)
In <1991May15.024325.805@ultra.com> marc@mercutio.ultra.com (Marc Kwiatkowski {Host Software-AIX}) writes: >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 > Internet: marc@ultra.com 101 Daggett Drive > uucp: ...!ames!ultra!marc San Jose, CA 95134 USA > telephone: 408 922 0100 x249 > Ignore the following signature. >-- > ------------------------------------------------------------------ > Marc P. Kwiatkowski Ultra Network Technologies > Internet: marc@ultra.com 101 Daggett Drive > 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 Internet : carl@cs.utas.edu.au || C.S.Lewis@cs.utas.edu.au Address || carl@probitas.cs.utas.edu.au -- Carl : Programmer (etc) with University of Tasmania Internet : carl@cs.utas.edu.au || C.S.Lewis@cs.utas.edu.au Address || carl@probitas.cs.utas.edu.au