Commit 343c05d3 by Martin Sebor Committed by Martin Sebor

PR r++/68490 - error initializing a structure with a flexible array membe

gcc/testsuite/ChangeLog:
2016-01-30  Martin Sebor  <msebor@redhat.com>                                   
                                                                                
        PR c++/68490                                                            
        * g++.dg/ext/flexary10.C: New test.

From-SVN: r233010
parent d6c3a539
2016-01-30 Martin Sebor <msebor@redhat.com>
PR c++/68490
* g++.dg/ext/flexary10.C: New test.
2016-01-30 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/66707
......
// PR c++/68490 - error initializing a structure with a flexible array member
// { dg-do compile }
// { dg-options "-Wpedantic" }
struct A {
int n;
int a [];
};
struct A foo (void)
{
// Verify the initializer below is accepted for compatibility with gcc
// (in C mode).
static struct A
a = { 2, { 1, 0 } }; // { dg-warning "initialization of a flexible array member" }
return a;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment