[FFmpeg-cvslog] r20874 - trunk/libavcodec/aac.c

Uoti Urpala uoti.urpala
Wed Dec 16 13:53:06 CET 2009


On Tue, 2009-12-15 at 21:23 -0500, David Conrad wrote:
> This breaks gcc and clang probably because they assume that an enum cannot have a value other than what's listed, and so assume type >= TYPE_SCE is always true.

Not quite. The issue is the integer type used for the enum type. Exactly
which one is chosen is implementation-defined behavior. With default
options GCC defines it as "the type is unsigned int if there are no
negative values in the enumeration, otherwise int.". So the bug in
Carl's change was that he made the type unsigned, thus rendering the
">= 0" test meaningless. GCC made no further assumptions about exactly
which values representable as unsigned int could appear.




More information about the ffmpeg-cvslog mailing list