Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!munnari.oz.au!comp.vuw.ac.nz!comp.vuw.ac.nz!mark From: mark@comp.vuw.ac.nz (Mark Davies) Newsgroups: comp.lang.c Subject: null args to macros in ANSI C Message-ID: <1989Oct9.195333.2544@comp.vuw.ac.nz> Date: 9 Oct 89 19:53:33 GMT Sender: news@comp.vuw.ac.nz (News Admin) Organization: Dept. of Comp. Sci., Victoria Uni. of Wellington, New Zealand. Lines: 18 Is objecting to the following bit of code an ANSI'ism? #define mem_alloc(s) malloc(s) extern char *mem_alloc(); gcc 1.36 complains (well actually its preprocessor does) about no args to macro `mem_alloc' and code seems to have been added to explicitly catch this case (when not invoked with -traditional). Why doesn't ANSI C allow the arguments of macros to be null strings? Admittedly if the above was "real" ANSI code it would be prototyped and so would work. mark -- mark@comp.vuw.ac.nz | ...!uunet!vuwcomp!mark | DEV_BSIZE forever!