https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68490

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
This was fixed with r231665.  GCC 6.0 produces the following output (the note
is only issued with the yet-to-be committed fix for bug 69277).

Resolving as fixed, though I will still add a test for this.

$ cat x.c && /home/msebor/build/gcc-trunk-svn/gcc/xgcc
-B/home/msebor/build/gcc-trunk-svn/gcc -S -Wall -Wextra -Wpedantic -xc++ x.c
struct A {
    int n;
    int a [];
};

struct A foo (void)
{
    static struct A a = { 2, { 1, 0 } };

    return a;
}
x.c: In function ‘A foo()’:
x.c:6:19: note: the ABI of passing struct with a flexible array member has
changed in GCC 4.4
 struct A foo (void)
                   ^

x.c:8:39: warning: initialization of a flexible array member [-Wpedantic]
     static struct A a = { 2, { 1, 0 } };
                                       ^

Reply via email to