From what I saw, the main use #if definedis checking multiple macros on the same line. Otherwise, for single definitions of macro definitions, they are identical to my knowledge.
#include <stdio.h>
int main()
{
#if defined(FOO) && defined(BAR)
printf("foobar!\n");
#else
printf("nothing.\n");
#endif
return 0;
}
$ tcc -DFOO -run ac
nothing.
$ tcc -DBAR -run ac
nothing.
$ tcc -DFOO -DBAR -run ac
foobar!
, gcc -Wall -ansi a.c, , #if defined ANSI C. , ANSI C 1987 #if defined ANSI - ANSI- , .
#if defined,
#ifdef FOO
#ifdef BAR
printf("foobar!\n");
#endif
#endif
, Redhat C
#if defined MACRO #ifdef MACRO.