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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [Woverride-init-3.c] - Rev 801

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

/* Test for warnings for overriding designated initializers: not
   warned for with -Wextra -Wno-override-init.  Bug 24010.  */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-options "-Wextra -Wno-override-init" } */
 
struct s { int a; int b; int c; };
union u { char a; long long b; };
 
struct s s0 = {
  .a = 1,
  .b = 2,
  .a = 3,
  4,
  5
};
 
union u u0 = {
  .a = 1,
  .b = 2,
  .a = 3
};
 
int a[5] = {
  [0] = 1,
  [1] = 2,
  [0] = 3,
  [2] = 4
};
 

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.