[FFmpeg-cvslog] r12620 - trunk/configure

matthieu castet castet.matthieu
Sat Mar 29 21:02:51 CET 2008


?smail D?nmez wrote:
> On Fri, Mar 28, 2008 at 10:04 PM, matthieu castet
> <castet.matthieu at free.fr> wrote:
>> diego wrote:
>>  > Author: diego
>>  > Date: Fri Mar 28 12:53:37 2008
>>  > New Revision: 12620
>>  >
>>  > Log:
>>  > Replace hackish CFLAGS 64 bit test by a proper compilation check.
>>  > patch by ?smail D?nmez, ismail namtrac org
>>  >
>>  >
>>  > Modified:
>>  >    trunk/configure
>>  >
>>  > Modified: trunk/configure
>>  > ==============================================================================
>>
>>> +        check_cc <<EOF && enable fast_64bit && arch="x86_64"
>>  > +        int test[sizeof(char*) - 7];
>>  > +EOF
>>  Just for info gcc see "sizeof(char*) - 7" as a big integer not a
>>  negative integer.
>>
>>  The check still failed on 32 bits because of array overflow. I wonder if
>>  it was the expected behaviour.
> 
> Yes thats the point, it won't compile on 32bit. Thats why we use check_cc.
my point was is there something in C standard that prevent to allocate 
such big array ?

Yes gcc failed because of array overflow, but not all C compiler are gcc.

May be it could be more safe to make "sizeof(char*) - 7" signed and be 
in the case of negative array (which is in the C standard).


Matthieu




More information about the ffmpeg-cvslog mailing list