Commit d6470dd0 by Zack Weinberg

Make this test less fragile

From-SVN: r26337
parent e9c6b69b
/* Test that __LINE__ works when embedded in a macro. */ /* Test that __LINE__ works when embedded in a macro. */
/* { dg-do run } */ /* { dg-do run } */
#define foo() bar(__LINE__) #define XLINE __LINE__
void void
bar(int x) bar(int x, int y)
{ {
if (x != 16) if (x != y)
abort(); abort();
} }
int int
main(void) main(void)
{ {
foo(); /* This is line 16 */ bar(XLINE, __LINE__);
return 0; return 0;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment