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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [Wcxx-compat-20.c] - Rev 801

Go to most recent revision | Compare with Previous | Blame | View Log

/* { 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" } */
} 
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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