This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/17929] New: Array of length 0 in struct file_handle


https://sourceware.org/bugzilla/show_bug.cgi?id=17929

            Bug ID: 17929
           Summary: Array of length 0 in struct file_handle
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: dwight.guth at runtimeverification dot com
                CC: drepper.fsp at gmail dot com

in sysdeps/unix/sysv/linux/bits/fcntl-linux.h, struct file_handle is defined
with an array member f_handle of length 0. This is a constraint violation
according to the C11 standard, section 6.7.6.2, paragraph 1, which declares
that if an array is declared with an integer constant expression as a size, it
shall have a value greater than 0.

I suspect what was actually meant here is for f_handle to have an incomplete
array type, which would declare f_handle as a flexible array member of the
struct.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]