lkml.org 
[lkml]   [2014]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel: use the gnu89 standard explicitly
On Sun, Oct 19, 2014 at 04:05:25PM -0700, Linus Torvalds wrote:
> On Sun, Oct 19, 2014 at 2:03 PM, Aaro Koskinen <aaro.koskinen@iki.fi> wrote:
> >
> > Here's one example how it fails: http://marc.info/?l=gcc&m=141349914632010&w=2
>
> Ok, that just looks like a gnu11 bug, then. Not being able to
> initialize structures because some sub-structure has a volatile member
> is just pure BS.
>
> Has anybody reported this as a gcc bug? That email may be on the gcc
> list, but I'm not seeing anybody acknowledge it as a bug..
>
> I cannot imagine that anybody sane claims that this is *wanted*
> behavior from "gnu11".

IIUC, it's nothing to do with volatile. C11 and above reads

(rwlock_t) { .raw_lock = { 0 }, }

as compound literal (which is not constant) rather than constant
initalizer plus a cast.

--
Kirill A. Shutemov


\
 
 \ /
  Last update: 2014-10-20 01:21    [W:0.104 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site