lkml.org 
[lkml]   [2020]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sched/fair: Replace zero-length array with flexible-array member
From
Date
On 14/02/2020 02:05, Joe Perches wrote:
> Nice.
> It would miss a few forms like:
>
> typedef struct tagfoo {
> ...
> type t[0];
> } foo;
>
> and
>
> struct {
> ...
> type t[0];
> } foo;
>
> and
>
> struct foo {
> ...
> type t[0];
> } *foo;
>
> etc...
>
>

Right! Digging around for some examples on handling typedefs & co I stumbled
on this construct:

T {
<blah>
};

This matches your typedef case, but none of the other two. I haven't found
a nice way to match them without listing down some special cases, which I
don't really like.

I might dig around sometime to figure out how this should be expressed; in
the meantime a simple 'grep -r "\[0\];"' will most likely yield faster results
(for hunting down ZLAs, that is).

\
 
 \ /
  Last update: 2020-02-17 00:39    [W:0.046 / U:12.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site