Prototypes for macros?

Dan Mick dan at kfw.COM
Tue May 8 13:17:43 AEST 1990


In article <1990May4.162637.29981 at laguna.ccsf.caltech.edu> gleeper at tybalt.caltech.edu (Evan Manning) writes:
>I guess I should have mentioned that I'm not a rank amateur.  

That, or not been so frigging touchy.  Sheesh.

>All
>appropriate headers were included (including time.h for seeding off
>the time in randomize()) and these are the precise same headers needed
>to avoid warnings after manually expanding macros.  My guess is that
>Turbo is checking for prototypes *before* expanding macros.  Which
>sounds wrong to me.  Has anybody encountered this before?

Well, tell ya what, Evan:  Try this test case.  It gives no warnings or
errors under TC 2.0 for me:


#include <stdlib.h>
#include <time.h>

int main(void)
{
    randomize();
    return 0;
}

Now what happens?  

BTW, for some more rank amateur suggestions that just might help, since
the problem you're having is most likely not the compiler....did you
try to reduce it to a small test case?  Did you look at stdlib.h for any
enclosing ifdefs that might rule out the prototypes you want? 



More information about the Comp.lang.c mailing list