[FFmpeg-devel] Various small fixes

Uoti Urpala uoti.urpala
Sat Dec 13 20:06:02 CET 2008


On Sat, 2008-12-13 at 18:17 +0100, Anders Gr?nberg wrote:
> 6.9.2 - External object definitions

> ?3 If the declaration of an identifier for an object is a tentative
> definition and has internal
> linkage, the declared type shall not be an incomplete type.

This does seem to prohibit declarations of static arrays before knowing
their size. That has some impractical consequences. It forces either
moving the initializer above the code using the array or counting the
number of entries in the initializer to be able to write a complete
declaration with the correct size (and then having two places to change
if entries are added or deleted). If you have two static arrays
initialized to contain pointers to each other then moving the code in
any order won't work.

I wonder what the reason for such a clumsy requirement is. Support for
really primitive one-pass compilers that make up the static variable
memory layout as they encounter them? But since they need to handle
global variables anyway that seems pointless.





More information about the ffmpeg-devel mailing list