OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [20020104-1.c] - Blame information for rev 706

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 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.