2017-10-21 18:40:19 -05:00
|
|
|
/* Conformance Test 3.3.0.1: Ensure macro names are ignored in comments */
|
|
|
|
/* and string constants */
|
2022-10-17 17:50:42 -05:00
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
int printf(const char *, ...);
|
|
|
|
|
2017-10-21 18:40:19 -05:00
|
|
|
#define sum(x,y) x+y
|
|
|
|
#define mult(x,y) x*y
|
|
|
|
|
2022-10-17 17:50:42 -05:00
|
|
|
int main (void)
|
2017-10-21 18:40:19 -05:00
|
|
|
{
|
|
|
|
char a[25];
|
|
|
|
int x, y;
|
|
|
|
|
|
|
|
x = /* sum(4,7) */ 10; /* This should be ignored */
|
|
|
|
y = /* mult(3,5) */ 2 * 9; /* This should also be ignored */
|
|
|
|
|
|
|
|
if ((x != 10) || (y != 18))
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
strcpy (a, "sum(x,y) mult(a,b)"); /* should also be ignored */
|
|
|
|
if ((strcmp (a, "sum(x,y) mult(a,b)")) != 0)
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
printf ("Passed Conformance Test 3.3.0.1\n");
|
2022-10-17 17:50:42 -05:00
|
|
|
return 0;
|
2017-10-21 18:40:19 -05:00
|
|
|
|
|
|
|
Fail:
|
|
|
|
printf ("Failed Conformance Test 3.3.0.1\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
|