[vlc-devel] [PATCH 6/7] config: use flexible array member instead of a zero length array

Felix Abecassis felix.abecassis at gmail.com
Tue May 6 23:27:12 CEST 2014


I think it means that you cannot apply sizeof to the struct *member*.

2014-05-06 23:24 GMT+02:00 Rémi Denis-Courmont <remi at remlab.net>:
> Le mardi 6 mai 2014, 23:15:52 Felix Abecassis a écrit :
>> ISO C was the same as ANSI C for me, OK.
>>
>> Could you give me a reference for this?
>
> FWIW, the GCC implies that sizeof() is not portable:
>
>    * Flexible array members have incomplete type, and so the `sizeof'
>      operator may not be applied.  As a quirk of the original
>      implementation of zero-length arrays, `sizeof' evaluates to zero.
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



-- 
Félix Abecassis
http://felix.abecassis.me



More information about the vlc-devel mailing list