| 1 |
// { dg-options "-fdiagnostics-show-caret" } |
| 2 |
|
| 3 |
#define TEST_1_DEPTH_0 throw bad_alloc; // { dg-line define_TEST_1_DEPTH_0 } |
| 4 |
|
| 5 |
void test_1 () |
| 6 |
{ |
| 7 |
TEST_1_DEPTH_0 // { dg-line use_TEST_1_DEPTH_0 } |
| 8 |
} |
| 9 |
|
| 10 |
// { dg-error "'bad_alloc' was not declared in this scope" "" { target *-*-* } define_TEST_1_DEPTH_0 } |
| 11 |
/* { dg-begin-multiline-output "" } |
| 12 |
#define TEST_1_DEPTH_0 throw bad_alloc; |
| 13 |
^~~~~~~~~ |
| 14 |
{ dg-end-multiline-output "" } */ |
| 15 |
// { dg-message "in expansion of macro 'TEST_1_DEPTH_0'" "" { target *-*-* } use_TEST_1_DEPTH_0 } |
| 16 |
/* { dg-begin-multiline-output "" } |
| 17 |
TEST_1_DEPTH_0 |
| 18 |
^~~~~~~~~~~~~~ |
| 19 |
{ dg-end-multiline-output "" } */ |
| 20 |
|
| 21 |
|
| 22 |
#define TEST_2_DEPTH_0 throw bad_alloc; // { dg-line define_TEST_2_DEPTH_0 } |
| 23 |
#define TEST_2_DEPTH_1 TEST_2_DEPTH_0 // { dg-line define_TEST_2_DEPTH_1 } |
| 24 |
|
| 25 |
void test_2 () |
| 26 |
{ |
| 27 |
TEST_2_DEPTH_1 // { dg-line use_TEST_2_DEPTH_1 } |
| 28 |
} |
| 29 |
|
| 30 |
// { dg-error "'bad_alloc' was not declared in this scope" "" { target *-*-* } define_TEST_2_DEPTH_0 } |
| 31 |
/* { dg-begin-multiline-output "" } |
| 32 |
#define TEST_2_DEPTH_0 throw bad_alloc; |
| 33 |
^~~~~~~~~ |
| 34 |
{ dg-end-multiline-output "" } */ |
| 35 |
// { dg-message "in expansion of macro 'TEST_2_DEPTH_0'" "" { target *-*-* } define_TEST_2_DEPTH_1 } |
| 36 |
/* { dg-begin-multiline-output "" } |
| 37 |
#define TEST_2_DEPTH_1 TEST_2_DEPTH_0 |
| 38 |
^~~~~~~~~~~~~~ |
| 39 |
{ dg-end-multiline-output "" } */ |
| 40 |
// { dg-message "in expansion of macro 'TEST_2_DEPTH_1'" "" { target *-*-* } use_TEST_2_DEPTH_1 } |
| 41 |
/* { dg-begin-multiline-output "" } |
| 42 |
TEST_2_DEPTH_1 |
| 43 |
^~~~~~~~~~~~~~ |
| 44 |
{ dg-end-multiline-output "" } */ |