gcc/testsuite/gcc.dg/Wframe-address-in-Wall.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-Wall" } */ |
| 3 | |
| 4 | /* Verify that -Wframe-address is included in -Wall. */ |
| 5 | |
| 6 | void* test_builtin_address (unsigned i) |
| 7 | { |
| 8 | void* const ba[] = { |
| 9 | __builtin_frame_address (4), /* { dg-warning "builtin_frame_address" } */ |
| 10 | __builtin_return_address (4) /* { dg-warning "builtin_return_address" } */ |
| 11 | }; |
| 12 | |
| 13 | return ba [i]; |
| 14 | } |