Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/20020104-1.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 /* Test whether statement with no effect warnings are not given for last | |
2 statements inside of statement expression. */ | |
3 /* { dg-do compile } */ | |
4 /* { dg-options "-O -Wall" } */ | |
5 | |
6 void bar (char *p, char *q); | |
7 | |
8 int main() | |
9 { | |
10 char foo [32], *p; | |
11 | |
12 ({ | |
13 void *s = (foo); | |
14 __builtin_memset (s, '\0', sizeof (foo)); | |
15 s; /* { dg-warning "no effect" "statement with no effect warning" } */ | |
16 s; /* { dg-bogus "no effect" "bogus statement with no effect warning" } */ | |
17 }); | |
18 p = foo; | |
19 p; /* { dg-warning "no effect" "statement with no effect warning" } */ | |
20 bar (foo, p); | |
21 return 0; | |
22 } |