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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [vla-init-2.c] - Diff between revs 149 and 154

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* Arrays of unknown size with element type a VLA type should not be
/* Arrays of unknown size with element type a VLA type should not be
   initialized (C99 isn't clear about whether such arrays are VLAs,
   initialized (C99 isn't clear about whether such arrays are VLAs,
   but this is the only reasonable interpretation).  Bug 16409, first
   but this is the only reasonable interpretation).  Bug 16409, first
   testcase.  */
   testcase.  */
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "" } */
/* { dg-options "" } */
 
 
const int i = 1;
const int i = 1;
void foo() { char a[][i] = {""}; } /* { dg-error "error: variable-sized object may not be initialized" } */
void foo() { char a[][i] = {""}; } /* { dg-error "error: variable-sized object may not be initialized" } */
/* { dg-error "array size missing in 'a'" "extra error" { target *-*-* } 9 } */
/* { dg-error "array size missing in 'a'" "extra error" { target *-*-* } 9 } */
 
 

powered by: WebSVN 2.1.0

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