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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wparentheses-14.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// { dg-do compile }
2
// { dg-options "-Wparentheses" }
3
 
4
// Template version of Wparentheses-2.C.
5
 
6
int foo (int);
7
 
8
int a, b, c;
9
bool d;
10
 
11
template
12
void
13
bar (T)
14
{
15
  if (a += b)
16
    foo (0);
17
  if (a -= a)
18
    foo (1);
19
  if (b *= c)
20
    foo (2);
21
  else
22
    foo (3);
23
  if (b /= b)
24
    foo (4);
25
  else
26
    foo (5);
27
  while (c %= b)
28
    foo (6);
29
  while (c <<= c)
30
    foo (7);
31
  do foo (8); while (a >>= b);
32
  do foo (9); while (a &= a);
33
  for (;c ^= b;)
34
    foo (10);
35
  for (;c |= c;)
36
    foo (11);
37
  d = a += b;
38
  foo (12);
39
  d = a -= a;
40
  foo (13);
41
}
42
 
43
template void bar (int);

powered by: WebSVN 2.1.0

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