Subject: bug#9077: coreutils-8.12: fiemap.h uses "struct fiemap_extent fm_extents[0]; "

From: Pádraig Brady <[email-masked]>
Date: Thu, 14 Jul 2011 12:45:25 +0100

On 14/07/11 08:03, Joachim Schmitz wrote:
> Hi folks
> 
> fiemap.h uses 
> 
> struct fiemap_extent fm_extents[0];
> 
> My compiler (HP NonStop) disallows that. The following would be allowed
> though:
> 
> struct fiemap_extent fm_extents[];

The non standard "zero length array" syntax was copied from
the linux kernel headers. Changing this to a C99 flexible array
as you suggest, should be fine according to the constraints listed here:
http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
It results in identical object files with GCC here.

I'll apply the above in your name.

cheers,
Pádraig.