[FFmpeg-cvslog] r12165 - trunk/libavcodec/dsputil.c
Loren Merritt
lorenm
Fri Feb 22 06:35:53 CET 2008
On Thu, 21 Feb 2008, Rich Felker wrote:
>
> The const keyword in C is not as strong as in C++. Historically it was
> just a hint for warning generation and binary sectioning. C99
> (possibly also C90?) add some teeth but I think it's still iffy to
> consider const-qualified variables as real constants. They're not
> usable in certain contexts where a constant is required.
It doesn't even have to be declared const.
"static unsigned long pb_7f = 0x7f7f7f7f7f7f7f7fUL" works too: gcc sees
that it is never assigned to and thus is in fact constant. (assuming unit
at a time, of course)
--Loren Merritt
More information about the ffmpeg-cvslog
mailing list