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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900404_01.C] - Rev 816

Compare with Previous | Blame | View Log

// { dg-do assemble  }
// g++ 1.37.1 bug 900404_01

// g++ allows string initializers for known-length character arrays to be
// one character longer (counting the terminating null) than the actual
// length of the array to be initialized.

// The C++ Reference Manual (section 8.4.2) expressly prohibits this.

// Cfront 2.0 passes this test.

// keywords: arrays, initialization, array bounds

char cv[4] = "asdf";            // { dg-error "" } missed

int main () { return 0; }

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.