OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [20020104-1.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* 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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.