aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/Wunused-var-8.c
blob: 0923b3556625584ecf79edecaf76bccefc7944fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Origin: PR c++/44108 */
/* { dg-options "-Wunused" } */
/* { dg-do compile } */

int
foo ()
{
  unsigned int M = 2;
  const unsigned int M_CONST = 2;
  static unsigned int M_STATIC = 2;
  static const unsigned int M_STATIC_CONST = 2;

  char n1[M];
  char n2[M_CONST];
  char n3[M_STATIC];
  char n4[M_STATIC_CONST];

  return sizeof (n1) + sizeof (n2) + sizeof (n3) + sizeof (n4);
}