1/* n_nularg.t: Empty argument of macro call. */ 2 3#define ARG( a) # a 4#define EMPTY 5#define SHOWN( n) printf( "%s : %d\n", # n, n) 6#define SHOWS( s) printf( "%s : %s\n", # s, ARG( s)) 7#define add( a, b) (a + b) 8#define sub( a, b) (a - b) 9#define math( op, a, b) op( a, b) 10#define APPEND( a, b) a ## b 11 12/* printf( "%s : %d\n", "math( sub, , y)", ( - y)); */ 13 SHOWN( math( sub, , y)); 14 15/* printf( "%s : %s\n", "EMPTY", ""); */ 16 SHOWS( EMPTY); 17 18/* printf( "%s : %s\n", "APPEND( CON, 1)", "CON1"); */ 19 SHOWS( APPEND( CON, 1)); 20 21/* printf( "%s : %s\n", "APPEND( CON, )", "CON"); */ 22 SHOWS( APPEND( CON, )); 23 24/* printf( "%s : %s\n", "APPEND( , )", ""); */ 25 SHOWS( APPEND( , )); 26 27