Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/Wcxx-compat-20.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-options "-Wc++-compat" } */ typedef struct s { const int i; } s; /* { dg-message "should be initialized" } */ union u {const int a; double b;}; /* { dg-message "should be initialized" } */ struct ts { int a; s v;}; struct ta { int a; s v[2];}; void f () { s v1; /* { dg-warning "uninitialized const member in" } */ s va[2]; /* { dg-warning "uninitialized const member in" } */ union u v2; /* { dg-warning "uninitialized const member in" } */ struct ts v3; /* { dg-warning "uninitialized const member in" } */ struct ta ta[2]; /* { dg-warning "uninitialized const member in" } */ }