Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/uninit-pr81782.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* { dg-do compile } */ | |
2 /* { dg-options "-Wmaybe-uninitialized" } */ | |
3 | |
4 int | |
5 foo (void) | |
6 { | |
7 char empty_array[] = { }; | |
8 int i, ret = 0; | |
9 | |
10 for (i = 0; i < (int) (sizeof (empty_array) / sizeof (empty_array[0])); i++) | |
11 ret = empty_array[i]; /* { dg-bogus "uninitialized" } */ | |
12 | |
13 return ret; | |
14 } |