|
Packit Service |
8bf002 |
/* n_19.c: Valid re-definitions of macros. */
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
#include "defs.h"
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
main( void)
|
|
Packit Service |
8bf002 |
{
|
|
Packit Service |
8bf002 |
int c = 1;
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
fputs( "started\n", stderr);
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
/* Excerpts from ISO C 6.8.3 "Examples". */
|
|
Packit Service |
8bf002 |
#define OBJ_LIKE (1-1)
|
|
Packit Service |
8bf002 |
#define FTN_LIKE(a) ( a )
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
/* 19.1: */
|
|
Packit Service |
8bf002 |
#define OBJ_LIKE /* white space */ (1-1) /* other */
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
/* 19.2: */
|
|
Packit Service |
8bf002 |
#define FTN_LIKE( a )( /* note the white space */ \
|
|
Packit Service |
8bf002 |
a /* other stuff on this line
|
|
Packit Service |
8bf002 |
*/ )
|
|
Packit Service |
8bf002 |
assert( FTN_LIKE( c) == 1);
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
fputs( "success\n", stderr);
|
|
Packit Service |
8bf002 |
return 0;
|
|
Packit Service |
8bf002 |
}
|
|
Packit Service |
8bf002 |
|