bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9077: coreutils-8.12: fiemap.h uses "struct fiemap_extent fm_extents


From: Pádraig Brady
Subject: bug#9077: coreutils-8.12: fiemap.h uses "struct fiemap_extent fm_extents[0]; "
Date: Thu, 14 Jul 2011 12:45:25 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]