|
Packit Service |
8bf002 |
/* n_30.c: Macro calls. */
|
|
Packit Service |
8bf002 |
/* Note: Comma separate the arguments of function-like macro call,
|
|
Packit Service |
8bf002 |
but comma between matching inner parenthesis doesn't. This feature
|
|
Packit Service |
8bf002 |
is tested on so many places in this suite especially on *.c samples
|
|
Packit Service |
8bf002 |
which use assert() macro, that no separete item to test this feature
|
|
Packit Service |
8bf002 |
is provided. */
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
#include "defs.h"
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
#define FUNC( a, b, c) a + b + c
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
main( void)
|
|
Packit Service |
8bf002 |
{
|
|
Packit Service |
8bf002 |
int a = 1, b = 2, c = 3;
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
fputs( "started\n", stderr);
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
/* 30.1: A macro call crossing lines. */
|
|
Packit Service |
8bf002 |
assert
|
|
Packit Service |
8bf002 |
(
|
|
Packit Service |
8bf002 |
FUNC
|
|
Packit Service |
8bf002 |
(
|
|
Packit Service |
8bf002 |
a,
|
|
Packit Service |
8bf002 |
b,
|
|
Packit Service |
8bf002 |
c
|
|
Packit Service |
8bf002 |
)
|
|
Packit Service |
8bf002 |
== 6
|
|
Packit Service |
8bf002 |
);
|
|
Packit Service |
8bf002 |
|
|
Packit Service |
8bf002 |
fputs( "success\n", stderr);
|
|
Packit Service |
8bf002 |
return 0;
|
|
Packit Service |
8bf002 |
}
|
|
Packit Service |
8bf002 |
|