Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/uninit-pr81782.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 84e7813d76e9 |
children |
rev | line source |
---|---|
131 | 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 } |