lkml.org 
[lkml]   [2018]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/11] UAPI: bcache: Fix use of embedded flexible array
On Tuesday 2018-10-09 17:41, David Howells wrote:

>Jan Engelhardt <jengelh@inai.de> wrote:
>
>> """it [the array size expression] shall be a converted constant expression of
>> type std::size_t and its value shall be greater than zero."""
>> —http://eel.is/c++draft/dcl.array
>
>Interesting. You're not actually quoting the full sentence:
>
> If the constant-expression is present, it shall be a converted
> constant expression of type std​::​size_­t and its value shall be
> greater than zero.
>
>This suggests that:
>
> __u64 ptr[]
>
>is actually valid

I think that kind of validity only goes for this kind of standalone
decl:

extern int myints[];

but not for []-inside-struct.

\
 
 \ /
  Last update: 2018-10-09 18:55    [W:0.085 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site