public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/63567] New: Linux kernel build error due to non-static initializers
@ 2014-10-16 22:46 sasha.levin at oracle dot com
  2014-10-17  5:33 ` [Bug c/63567] " mpolacek at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: sasha.levin at oracle dot com @ 2014-10-16 22:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63567
           Summary: Linux kernel build error due to non-static
                    initializers
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sasha.levin at oracle dot com

Hi all,

I'm seeing a new build issue with the linux kernel:

  CC      kernel/smpboot.o
In file included from include/linux/mutex.h:15:0,
                 from include/linux/kernfs.h:13,
                 from include/linux/sysfs.h:15,
                 from include/linux/kobject.h:21,
                 from include/linux/device.h:17,
                 from include/linux/node.h:17,
                 from include/linux/cpu.h:16,
                 from kernel/smpboot.c:4:
include/linux/spinlock_types.h:82:2: error: initializer element is not constant
  (spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname)
  ^
include/linux/mutex.h:112:18: note: in expansion of macro
‘__SPIN_LOCK_UNLOCKED’
   , .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \
                  ^
include/linux/mutex.h:118:27: note: in expansion of macro ‘__MUTEX_INITIALIZER’
  struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
                           ^
kernel/smpboot.c:80:8: note: in expansion of macro ‘DEFINE_MUTEX’
 static DEFINE_MUTEX(smpboot_threads_lock);
        ^
include/linux/spinlock_types.h:82:2: note: (near initialization for
‘smpboot_threads_lock.wait_lock’)
  (spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname)
  ^
include/linux/mutex.h:112:18: note: in expansion of macro
‘__SPIN_LOCK_UNLOCKED’
   , .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \
                  ^
include/linux/mutex.h:118:27: note: in expansion of macro ‘__MUTEX_INITIALIZER’
  struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
                           ^
kernel/smpboot.c:80:8: note: in expansion of macro ‘DEFINE_MUTEX’
 static DEFINE_MUTEX(smpboot_threads_lock);
        ^
make[1]: *** [kernel/smpboot.o] Error 1
make: *** [kernel/smpboot.o] Error 2


This was bisected down to:

commit b2601928b5bf34a817b5a9a2a371c476018e634d
Author: mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Wed Oct 15 10:08:00 2014 +0000

        * doc/invoke.texi: Update to reflect that GNU11 is the default
        mode for C.
        * c-common.h (c_language_kind): Update comment.
    c-family/
        * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.


    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216247
138bc75d-0d04-0410-961f-82ee72b054a4
>From gcc-bugs-return-464297-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Oct 16 22:49:46 2014
Return-Path: <gcc-bugs-return-464297-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 11447 invoked by alias); 16 Oct 2014 22:49:46 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 11418 invoked by uid 48); 16 Oct 2014 22:49:42 -0000
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/63567] Linux kernel build error due to non-static initializers
Date: Thu, 16 Oct 2014 22:49:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: pinskia at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed
Message-ID: <bug-63567-4-eQ6hK6B58S@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63567-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63567-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-10/txt/msg01318.txt.bz2
Content-length: 833

https://gcc.gnu.org/bugzilla/show_bug.cgi?idc567

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-10-16
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I Just reported this to the mailing list:
https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01640.html

The reduced testcase that shows the difference between GNU 89 and GNU 11/99:
typedef struct {
 volatile unsigned int lock;
} arch_rwlock_t;
typedef struct {
 arch_rwlock_t raw_lock;
} rwlock_t;

static rwlock_t step_hook_lock = (rwlock_t) { .raw_lock = { 0 }, };


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c/63567] Linux kernel build error due to non-static initializers
  2014-10-16 22:46 [Bug c/63567] New: Linux kernel build error due to non-static initializers sasha.levin at oracle dot com
@ 2014-10-17  5:33 ` mpolacek at gcc dot gnu.org
  2014-10-17  5:38 ` mpolacek at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-10-17  5:33 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |mpolacek at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |5.0

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I believe we should just allow initializing objects with static storage
duration with compound literals even in gnu99/gnu11.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c/63567] Linux kernel build error due to non-static initializers
  2014-10-16 22:46 [Bug c/63567] New: Linux kernel build error due to non-static initializers sasha.levin at oracle dot com
  2014-10-17  5:33 ` [Bug c/63567] " mpolacek at gcc dot gnu.org
@ 2014-10-17  5:38 ` mpolacek at gcc dot gnu.org
  2014-10-17 21:03 ` mpolacek at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-10-17  5:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(But warn with -pedantic.)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c/63567] Linux kernel build error due to non-static initializers
  2014-10-16 22:46 [Bug c/63567] New: Linux kernel build error due to non-static initializers sasha.levin at oracle dot com
  2014-10-17  5:33 ` [Bug c/63567] " mpolacek at gcc dot gnu.org
  2014-10-17  5:38 ` mpolacek at gcc dot gnu.org
@ 2014-10-17 21:03 ` mpolacek at gcc dot gnu.org
  2014-10-17 21:04 ` mpolacek at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-10-17 21:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Fri Oct 17 21:02:54 2014
New Revision: 216416

URL: https://gcc.gnu.org/viewcvs?rev=216416&root=gcc&view=rev
Log:
    PR c/63567
    * c-typeck.c (digest_init): Allow initializing objects with static
    storage duration with compound literals even in C99 and add pedwarn
    for it.

    * gcc.dg/pr61096-1.c: Change dg-error into dg-warning.
    * gcc.dg/pr63567-1.c: New test.
    * gcc.dg/pr63567-2.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr63567-1.c
    trunk/gcc/testsuite/gcc.dg/pr63567-2.c
Modified:
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-typeck.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/pr61096-1.c


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c/63567] Linux kernel build error due to non-static initializers
  2014-10-16 22:46 [Bug c/63567] New: Linux kernel build error due to non-static initializers sasha.levin at oracle dot com
                   ` (2 preceding siblings ...)
  2014-10-17 21:03 ` mpolacek at gcc dot gnu.org
@ 2014-10-17 21:04 ` mpolacek at gcc dot gnu.org
  2014-10-18  5:26 ` sasha.levin at oracle dot com
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-10-17 21:04 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

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

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Should be fixed.  I did what I outlined in #c2 and #c3.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c/63567] Linux kernel build error due to non-static initializers
  2014-10-16 22:46 [Bug c/63567] New: Linux kernel build error due to non-static initializers sasha.levin at oracle dot com
                   ` (3 preceding siblings ...)
  2014-10-17 21:04 ` mpolacek at gcc dot gnu.org
@ 2014-10-18  5:26 ` sasha.levin at oracle dot com
  2014-10-18 17:53 ` sasha.levin at oracle dot com
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: sasha.levin at oracle dot com @ 2014-10-18  5:26 UTC (permalink / raw)
  To: gcc-bugs

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

Sasha Levin <sasha.levin at oracle dot com> changed:

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

--- Comment #6 from Sasha Levin <sasha.levin at oracle dot com> ---
I'm still seeing the issue with the fix applied:

  CC      kernel/smpboot.o
In file included from include/linux/mutex.h:15:0,
                 from include/linux/kernfs.h:13,
                 from include/linux/sysfs.h:15,
                 from include/linux/kobject.h:21,
                 from include/linux/device.h:17,
                 from include/linux/node.h:17,
                 from include/linux/cpu.h:16,
                 from kernel/smpboot.c:4:
include/linux/spinlock_types.h:82:2: error: initializer element is not constant
  (spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname)
  ^
include/linux/mutex.h:112:18: note: in expansion of macro
‘__SPIN_LOCK_UNLOCKED’
   , .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \
                  ^
include/linux/mutex.h:118:27: note: in expansion of macro ‘__MUTEX_INITIALIZER’
  struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
                           ^
kernel/smpboot.c:80:8: note: in expansion of macro ‘DEFINE_MUTEX’
 static DEFINE_MUTEX(smpboot_threads_lock);
        ^
include/linux/spinlock_types.h:82:2: note: (near initialization for
‘smpboot_threads_lock.wait_lock’)
  (spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname)
  ^
include/linux/mutex.h:112:18: note: in expansion of macro
‘__SPIN_LOCK_UNLOCKED’
   , .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \
                  ^
include/linux/mutex.h:118:27: note: in expansion of macro ‘__MUTEX_INITIALIZER’
  struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
                           ^
kernel/smpboot.c:80:8: note: in expansion of macro ‘DEFINE_MUTEX’
 static DEFINE_MUTEX(smpboot_threads_lock);
>From gcc-bugs-return-464401-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Oct 18 07:26:25 2014
Return-Path: <gcc-bugs-return-464401-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 32624 invoked by alias); 18 Oct 2014 07:26:24 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 32584 invoked by uid 48); 18 Oct 2014 07:26:21 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/63567] Linux kernel build error due to non-static initializers
Date: Sat, 18 Oct 2014 07:26:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: REOPENED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-63567-4-eH4NT6thS1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63567-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63567-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-10/txt/msg01422.txt.bz2
Content-length: 231

https://gcc.gnu.org/bugzilla/show_bug.cgi?idc567

--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Well, can you give me preprocessed source code then?
Because the short testcase in Comment 1 is accepted now.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c/63567] Linux kernel build error due to non-static initializers
  2014-10-16 22:46 [Bug c/63567] New: Linux kernel build error due to non-static initializers sasha.levin at oracle dot com
                   ` (5 preceding siblings ...)
  2014-10-18 17:53 ` sasha.levin at oracle dot com
@ 2014-10-18 17:53 ` sasha.levin at oracle dot com
  2014-10-18 18:30 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: sasha.levin at oracle dot com @ 2014-10-18 17:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Sasha Levin <sasha.levin at oracle dot com> ---
I've attached the preprocessed kernel/smpboot.c. The problem seems to be in
line 24563:

static struct mutex smpboot_threads_lock = { .count = { (1) } , .wait_lock =
(spinlock_t ) { { .rlock = { .raw_lock = { { 0 } }, .magic = 0xdead4ead,
.owner_cpu = -1, .owner = ((void *)-1L), .dep_map = { .name =
"smpboot_threads_lock.wait_lock" } } } } , .wait_list = {
&(smpboot_threads_lock.wait_list), &(smpboot_threads_lock.wait_list) } , .magic
= &smpboot_threads_lock , .dep_map = { .name = "smpboot_threads_lock" } };


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c/63567] Linux kernel build error due to non-static initializers
  2014-10-16 22:46 [Bug c/63567] New: Linux kernel build error due to non-static initializers sasha.levin at oracle dot com
                   ` (4 preceding siblings ...)
  2014-10-18  5:26 ` sasha.levin at oracle dot com
@ 2014-10-18 17:53 ` sasha.levin at oracle dot com
  2014-10-18 17:53 ` sasha.levin at oracle dot com
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: sasha.levin at oracle dot com @ 2014-10-18 17:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Sasha Levin <sasha.levin at oracle dot com> ---
Created attachment 33756
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33756&action=edit
Preprocessed kernel/smpboot.c


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c/63567] Linux kernel build error due to non-static initializers
  2014-10-16 22:46 [Bug c/63567] New: Linux kernel build error due to non-static initializers sasha.levin at oracle dot com
                   ` (6 preceding siblings ...)
  2014-10-18 17:53 ` sasha.levin at oracle dot com
@ 2014-10-18 18:30 ` mpolacek at gcc dot gnu.org
  2014-10-19  4:17 ` sasha.levin at oracle dot com
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-10-18 18:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Thanks.  This fixes it (I need to write a proper testcase and test it).

2014-10-18  Marek Polacek  <polacek@redhat.com>

    PR c/63567
    * c-typeck.c (output_init_element): Allow initializing objects with
    static storage duration with compound literals even in C99 and add
    pedwarn for it.

diff --git gcc/c/c-typeck.c gcc/c/c-typeck.c
index 0dd3366..ee874da 100644
--- gcc/c/c-typeck.c
+++ gcc/c/c-typeck.c
@@ -8251,11 +8251,14 @@ output_init_element (location_t loc, tree value, tree
origtype,
     value = array_to_pointer_conversion (input_location, value);

   if (TREE_CODE (value) == COMPOUND_LITERAL_EXPR
-      && require_constant_value && !flag_isoc99 && pending)
+      && require_constant_value && pending)
     {
       /* As an extension, allow initializing objects with static storage
      duration with compound literals (which are then treated just as
      the brace enclosed list they contain).  */
+      if (flag_isoc99)
+    pedwarn_init (loc, OPT_Wpedantic, "initializer element is not "
+              "constant");
       tree decl = COMPOUND_LITERAL_EXPR_DECL (value);
       value = DECL_INITIAL (decl);
     }


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c/63567] Linux kernel build error due to non-static initializers
  2014-10-16 22:46 [Bug c/63567] New: Linux kernel build error due to non-static initializers sasha.levin at oracle dot com
                   ` (7 preceding siblings ...)
  2014-10-18 18:30 ` mpolacek at gcc dot gnu.org
@ 2014-10-19  4:17 ` sasha.levin at oracle dot com
  2014-10-19 16:50 ` mpolacek at gcc dot gnu.org
  2014-10-19 18:27 ` mpolacek at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: sasha.levin at oracle dot com @ 2014-10-19  4:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Sasha Levin <sasha.levin at oracle dot com> ---
That does the trick. Thanks!

A different issue with the patch I've previously bisected came up, I'll open a
different bug report for that.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c/63567] Linux kernel build error due to non-static initializers
  2014-10-16 22:46 [Bug c/63567] New: Linux kernel build error due to non-static initializers sasha.levin at oracle dot com
                   ` (8 preceding siblings ...)
  2014-10-19  4:17 ` sasha.levin at oracle dot com
@ 2014-10-19 16:50 ` mpolacek at gcc dot gnu.org
  2014-10-19 18:27 ` mpolacek at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-10-19 16:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Sun Oct 19 16:47:35 2014
New Revision: 216440

URL: https://gcc.gnu.org/viewcvs?rev=216440&root=gcc&view=rev
Log:
    PR c/63567
    * c-typeck.c (output_init_element): Allow initializing objects with
    static storage duration with compound literals even in C99 and add
    pedwarn for it.

    * gcc.dg/pr63567-3.c: New test.
    * gcc.dg/pr63567-4.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr63567-3.c
    trunk/gcc/testsuite/gcc.dg/pr63567-4.c
Modified:
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-typeck.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c/63567] Linux kernel build error due to non-static initializers
  2014-10-16 22:46 [Bug c/63567] New: Linux kernel build error due to non-static initializers sasha.levin at oracle dot com
                   ` (9 preceding siblings ...)
  2014-10-19 16:50 ` mpolacek at gcc dot gnu.org
@ 2014-10-19 18:27 ` mpolacek at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-10-19 18:27 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

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

--- Comment #13 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Now fixed for real.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-10-19 16:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-16 22:46 [Bug c/63567] New: Linux kernel build error due to non-static initializers sasha.levin at oracle dot com
2014-10-17  5:33 ` [Bug c/63567] " mpolacek at gcc dot gnu.org
2014-10-17  5:38 ` mpolacek at gcc dot gnu.org
2014-10-17 21:03 ` mpolacek at gcc dot gnu.org
2014-10-17 21:04 ` mpolacek at gcc dot gnu.org
2014-10-18  5:26 ` sasha.levin at oracle dot com
2014-10-18 17:53 ` sasha.levin at oracle dot com
2014-10-18 17:53 ` sasha.levin at oracle dot com
2014-10-18 18:30 ` mpolacek at gcc dot gnu.org
2014-10-19  4:17 ` sasha.levin at oracle dot com
2014-10-19 16:50 ` mpolacek at gcc dot gnu.org
2014-10-19 18:27 ` mpolacek at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).