[FFmpeg-cvslog] r12165 - trunk/libavcodec/dsputil.c

Måns Rullgård mans
Fri Feb 22 10:21:44 CET 2008


Rich Felker <dalias at aerifal.cx> writes:

> On Thu, Feb 21, 2008 at 10:35:53PM -0700, Loren Merritt wrote:
>> 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)
>
> If I someday switch to gcc 4, -fno-unit-at-a-time is probably the only
> hope of building with <= 128 megs of ram. I'd rather not have
> gratuitous dependencies on unit-at-a-time for optimal code when it's
> trivial to write the optimal version directly.

I agree with Rich in principle.  However, I find his arguments about
antiquated hardware tiresome and silly.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-cvslog mailing list