Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/pure-3.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* PR tree-optimization/83559 - -Wsuggest-attribute=const conflicts with | |
2 -Wattributes warning about const attribute on function returning void | |
3 { dg-do compile { target nonpic } } | |
4 { dg-options "-O2 -Wsuggest-attribute=pure" } */ | |
5 | |
6 int global; | |
7 | |
8 int f_i_v (void) /* { dg-warning "candidate for attribute .pure." } */ | |
9 { | |
10 return global; | |
11 } | |
12 | |
13 int f_i () /* { dg-warning "candidate for attribute .pure." } */ | |
14 { | |
15 return global; | |
16 } | |
17 | |
18 void f_v_v (void) /* { dg-bogus "candidate" } */ | |
19 { | |
20 } | |
21 | |
22 void f_v () /* { dg-bogus "candidate" } */ | |
23 { | |
24 } |