comparison gcc/testsuite/gcc.dg/Wframe-address-in-Wall.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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 }